Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: cipd/client/cmd/cipd/main.go

Issue 2651563005: [cipd] Deprecate -list in favor of -ensure-file. (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cipd/client/cmd/cipd/main.go
diff --git a/cipd/client/cmd/cipd/main.go b/cipd/client/cmd/cipd/main.go
index ff6d7fd1faff37a261dfd3c849b227e46b1c3530..2a9a7614f89e98806b8ed80fd4e56396f8a958e8 100644
--- a/cipd/client/cmd/cipd/main.go
+++ b/cipd/client/cmd/cipd/main.go
@@ -705,7 +705,10 @@ var cmdEnsure = &subcommands.Command{
c.registerBaseFlags()
c.ClientOptions.registerFlags(&c.Flags)
c.Flags.StringVar(&c.rootDir, "root", "<path>", "Path to an installation site root directory.")
- c.Flags.StringVar(&c.listFile, "list", "<path>", "A file with a list of '<package name> <version>' pairs.")
+ c.Flags.StringVar(&c.ensureFile, "list", "<path>", "(DEPRECATED) A synonym for -ensure-file.")
+ c.Flags.StringVar(&c.ensureFile, "ensure-file", "<path>",
+ (`An "ensure" file. See syntax described here: ` +
+ `https://godoc.org/github.com/luci/luci-go/cipd/client/cipd/ensure`))
return c
},
}
@@ -714,8 +717,8 @@ type ensureRun struct {
Subcommand
ClientOptions
- rootDir string
- listFile string
+ rootDir string
+ ensureFile string
}
func (c *ensureRun) Run(a subcommands.Application, args []string, env subcommands.Env) int {
@@ -723,7 +726,7 @@ func (c *ensureRun) Run(a subcommands.Application, args []string, env subcommand
return 1
}
ctx := cli.GetContext(a, c, env)
- currentPins, _, err := ensurePackages(ctx, c.rootDir, c.listFile, false, c.ClientOptions)
+ currentPins, _, err := ensurePackages(ctx, c.rootDir, c.ensureFile, false, c.ClientOptions)
return c.done(currentPins, err)
}
@@ -796,7 +799,10 @@ var cmdPuppetCheckUpdates = &subcommands.Command{
c.registerBaseFlags()
c.ClientOptions.registerFlags(&c.Flags)
c.Flags.StringVar(&c.rootDir, "root", "<path>", "Path to an installation site root directory.")
- c.Flags.StringVar(&c.listFile, "list", "<path>", "A file with a list of '<package name> <version>' pairs.")
+ c.Flags.StringVar(&c.ensureFile, "list", "<path>", "(DEPRECATED) A synonym for -ensure-file.")
+ c.Flags.StringVar(&c.ensureFile, "ensure-file", "<path>",
+ (`An "ensure" file. See syntax described here: ` +
+ `https://godoc.org/github.com/luci/luci-go/cipd/client/cipd/ensure`))
return c
},
}
@@ -805,8 +811,8 @@ type checkUpdatesRun struct {
Subcommand
ClientOptions
- rootDir string
- listFile string
+ rootDir string
+ ensureFile string
}
func (c *checkUpdatesRun) Run(a subcommands.Application, args []string, env subcommands.Env) int {
@@ -814,7 +820,7 @@ func (c *checkUpdatesRun) Run(a subcommands.Application, args []string, env subc
return 1
}
ctx := cli.GetContext(a, c, env)
- _, actions, err := ensurePackages(ctx, c.rootDir, c.listFile, true, c.ClientOptions)
+ _, actions, err := ensurePackages(ctx, c.rootDir, c.ensureFile, true, c.ClientOptions)
if err != nil {
ret := c.done(actions, err)
if errors.IsTransient(err) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698