From 5e348644949250efb72bf3b8d88a588a6fd9d340 Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Tue, 27 Oct 2015 18:35:57 -0700 Subject: [PATCH] Add deprecation notice for -m/-message --- command/push.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/command/push.go b/command/push.go index 4100282dd..b9ce96769 100644 --- a/command/push.go +++ b/command/push.go @@ -3,6 +3,7 @@ package command import ( "fmt" "io" + "log" "os" "os/signal" "path/filepath" @@ -38,18 +39,25 @@ type pushUploadFn func( func (c *PushCommand) Run(args []string) int { var token string + var message string var name string var create bool f := c.Meta.FlagSet("push", FlagSetVars) f.Usage = func() { c.Ui.Error(c.Help()) } f.StringVar(&token, "token", "", "token") + f.StringVar(&message, "m", "", "message") + f.StringVar(&message, "message", "", "message") f.StringVar(&name, "name", "", "name") f.BoolVar(&create, "create", false, "create (deprecated)") if err := f.Parse(args); err != nil { return 1 } + if message != "" { + log.Printf("[WARN] -m/-message is deprecated and will be removed in a future Packer release") + } + args = f.Args() if len(args) != 1 { f.Usage()