Add deprecation notice for -m/-message

This commit is contained in:
Chris Bednarski 2015-10-27 18:35:57 -07:00
parent 0e9cd5caa9
commit 5e34864494
1 changed files with 8 additions and 0 deletions

View File

@ -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()