command/push: rename -module-lock to -module-upload
This commit is contained in:
parent
da46e16f4f
commit
ee1ad49829
|
@ -21,13 +21,13 @@ type PushCommand struct {
|
||||||
|
|
||||||
func (c *PushCommand) Run(args []string) int {
|
func (c *PushCommand) Run(args []string) int {
|
||||||
var atlasToken string
|
var atlasToken string
|
||||||
var moduleLock bool
|
var moduleUpload bool
|
||||||
var name string
|
var name string
|
||||||
args = c.Meta.process(args, false)
|
args = c.Meta.process(args, false)
|
||||||
cmdFlags := c.Meta.flagSet("push")
|
cmdFlags := c.Meta.flagSet("push")
|
||||||
cmdFlags.StringVar(&c.Meta.statePath, "state", DefaultStateFilename, "path")
|
cmdFlags.StringVar(&c.Meta.statePath, "state", DefaultStateFilename, "path")
|
||||||
cmdFlags.StringVar(&atlasToken, "token", "", "")
|
cmdFlags.StringVar(&atlasToken, "token", "", "")
|
||||||
cmdFlags.BoolVar(&moduleLock, "module-lock", true, "")
|
cmdFlags.BoolVar(&moduleUpload, "module-upload", true, "")
|
||||||
cmdFlags.StringVar(&name, "name", "", "")
|
cmdFlags.StringVar(&name, "name", "", "")
|
||||||
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
|
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
|
||||||
if err := cmdFlags.Parse(args); err != nil {
|
if err := cmdFlags.Parse(args); err != nil {
|
||||||
|
@ -125,8 +125,8 @@ func (c *PushCommand) Run(args []string) int {
|
||||||
DefaultDataDir: c.DataDir(),
|
DefaultDataDir: c.DataDir(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if !moduleLock {
|
if !moduleUpload {
|
||||||
// If we're not locking modules, then exclude the modules dir.
|
// If we're not uploading modules, then exclude the modules dir.
|
||||||
archiveOpts.Exclude = append(
|
archiveOpts.Exclude = append(
|
||||||
archiveOpts.Exclude,
|
archiveOpts.Exclude,
|
||||||
filepath.Join(c.DataDir(), "modules"))
|
filepath.Join(c.DataDir(), "modules"))
|
||||||
|
@ -164,7 +164,7 @@ Usage: terraform push [options] [DIR]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
-module-lock=true If true (default), then the modules are locked at
|
-module-upload=true If true (default), then the modules are locked at
|
||||||
their current checkout and uploaded completely. This
|
their current checkout and uploaded completely. This
|
||||||
prevents Atlas from running "terraform get".
|
prevents Atlas from running "terraform get".
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue