Commit 29d0c339 authored by Jim's avatar Jim

fix(helm): make 'helm help' text punctuation consistent

parent c5557b38
...@@ -62,6 +62,7 @@ func newCreateCmd(out io.Writer) *cobra.Command { ...@@ -62,6 +62,7 @@ func newCreateCmd(out io.Writer) *cobra.Command {
cc := &createCmd{ cc := &createCmd{
out: out, out: out,
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "create NAME", Use: "create NAME",
Short: "create a new chart with the given name", Short: "create a new chart with the given name",
...@@ -74,6 +75,7 @@ func newCreateCmd(out io.Writer) *cobra.Command { ...@@ -74,6 +75,7 @@ func newCreateCmd(out io.Writer) *cobra.Command {
return cc.run() return cc.run()
}, },
} }
return cmd return cmd
} }
......
...@@ -71,6 +71,7 @@ func newDeleteCmd(c helm.Interface, out io.Writer) *cobra.Command { ...@@ -71,6 +71,7 @@ func newDeleteCmd(c helm.Interface, out io.Writer) *cobra.Command {
return nil return nil
}, },
} }
f := cmd.Flags() f := cmd.Flags()
f.BoolVar(&del.dryRun, "dry-run", false, "simulate a delete") f.BoolVar(&del.dryRun, "dry-run", false, "simulate a delete")
f.BoolVar(&del.disableHooks, "no-hooks", false, "prevent hooks from running during deletion") f.BoolVar(&del.disableHooks, "no-hooks", false, "prevent hooks from running during deletion")
......
...@@ -64,8 +64,8 @@ func newDependencyBuildCmd(out io.Writer) *cobra.Command { ...@@ -64,8 +64,8 @@ func newDependencyBuildCmd(out io.Writer) *cobra.Command {
} }
f := cmd.Flags() f := cmd.Flags()
f.BoolVar(&dbc.verify, "verify", false, "Verify the packages against signatures.") f.BoolVar(&dbc.verify, "verify", false, "verify the packages against signatures")
f.StringVar(&dbc.keyring, "keyring", defaultKeyring(), "The keyring containing public keys.") f.StringVar(&dbc.keyring, "keyring", defaultKeyring(), "keyring containing public keys")
return cmd return cmd
} }
......
...@@ -73,8 +73,8 @@ func newDependencyUpdateCmd(out io.Writer) *cobra.Command { ...@@ -73,8 +73,8 @@ func newDependencyUpdateCmd(out io.Writer) *cobra.Command {
} }
f := cmd.Flags() f := cmd.Flags()
f.BoolVar(&duc.verify, "verify", false, "Verify the packages against signatures.") f.BoolVar(&duc.verify, "verify", false, "verify the packages against signatures")
f.StringVar(&duc.keyring, "keyring", defaultKeyring(), "The keyring containing public keys.") f.StringVar(&duc.keyring, "keyring", defaultKeyring(), "keyring containing public keys")
return cmd return cmd
} }
......
...@@ -79,12 +79,12 @@ func newFetchCmd(out io.Writer) *cobra.Command { ...@@ -79,12 +79,12 @@ func newFetchCmd(out io.Writer) *cobra.Command {
} }
f := cmd.Flags() f := cmd.Flags()
f.BoolVar(&fch.untar, "untar", false, "If set to true, will untar the chart after downloading it.") f.BoolVar(&fch.untar, "untar", false, "if set to true, will untar the chart after downloading it")
f.StringVar(&fch.untardir, "untardir", ".", "If untar is specified, this flag specifies the name of the directory into which the chart is expanded.") f.StringVar(&fch.untardir, "untardir", ".", "if untar is specified, this flag specifies the name of the directory into which the chart is expanded")
f.BoolVar(&fch.verify, "verify", false, "Verify the package against its signature.") f.BoolVar(&fch.verify, "verify", false, "verify the package against its signature")
f.StringVar(&fch.version, "version", "", "The specific version of a chart. Without this, the latest version is fetched.") f.StringVar(&fch.version, "version", "", "specific version of a chart. Without this, the latest version is fetched")
f.StringVar(&fch.keyring, "keyring", defaultKeyring(), "The keyring containing public keys.") f.StringVar(&fch.keyring, "keyring", defaultKeyring(), "keyring containing public keys")
f.StringVarP(&fch.destdir, "destination", "d", ".", "The location to write the chart. If this and tardir are specified, tardir is appended to this.") f.StringVarP(&fch.destdir, "destination", "d", ".", "location to write the chart. If this and tardir are specified, tardir is appended to this")
return cmd return cmd
} }
......
...@@ -56,6 +56,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -56,6 +56,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
out: out, out: out,
client: client, client: client,
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "get [flags] RELEASE_NAME", Use: "get [flags] RELEASE_NAME",
Short: "download a named release", Short: "download a named release",
...@@ -78,6 +79,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -78,6 +79,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
cmd.AddCommand(newGetValuesCmd(nil, out)) cmd.AddCommand(newGetValuesCmd(nil, out))
cmd.AddCommand(newGetManifestCmd(nil, out)) cmd.AddCommand(newGetManifestCmd(nil, out))
cmd.AddCommand(newGetHooksCmd(nil, out)) cmd.AddCommand(newGetHooksCmd(nil, out))
return cmd return cmd
} }
......
...@@ -54,6 +54,7 @@ type historyCmd struct { ...@@ -54,6 +54,7 @@ type historyCmd struct {
func newHistoryCmd(c helm.Interface, w io.Writer) *cobra.Command { func newHistoryCmd(c helm.Interface, w io.Writer) *cobra.Command {
his := &historyCmd{out: w, helmc: c} his := &historyCmd{out: w, helmc: c}
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "history [flags] RELEASE_NAME", Use: "history [flags] RELEASE_NAME",
Long: historyHelp, Long: historyHelp,
...@@ -73,6 +74,7 @@ func newHistoryCmd(c helm.Interface, w io.Writer) *cobra.Command { ...@@ -73,6 +74,7 @@ func newHistoryCmd(c helm.Interface, w io.Writer) *cobra.Command {
} }
cmd.Flags().Int32Var(&his.max, "max", 256, "maximum number of revision to include in history") cmd.Flags().Int32Var(&his.max, "max", 256, "maximum number of revision to include in history")
return cmd return cmd
} }
......
...@@ -37,5 +37,6 @@ func newHomeCmd(out io.Writer) *cobra.Command { ...@@ -37,5 +37,6 @@ func newHomeCmd(out io.Writer) *cobra.Command {
fmt.Fprintf(out, homePath()+"\n") fmt.Fprintf(out, homePath()+"\n")
}, },
} }
return cmd return cmd
} }
...@@ -56,6 +56,7 @@ func newInitCmd(out io.Writer) *cobra.Command { ...@@ -56,6 +56,7 @@ func newInitCmd(out io.Writer) *cobra.Command {
i := &initCmd{ i := &initCmd{
out: out, out: out,
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "init", Use: "init",
Short: "initialize Helm on both client and server", Short: "initialize Helm on both client and server",
...@@ -68,9 +69,12 @@ func newInitCmd(out io.Writer) *cobra.Command { ...@@ -68,9 +69,12 @@ func newInitCmd(out io.Writer) *cobra.Command {
return i.run() return i.run()
}, },
} }
cmd.Flags().StringVarP(&i.image, "tiller-image", "i", "", "override tiller image")
cmd.Flags().BoolVar(&i.canary, "canary-image", false, "use the canary tiller image") f := cmd.Flags()
cmd.Flags().BoolVarP(&i.clientOnly, "client-only", "c", false, "if set does not install tiller") f.StringVarP(&i.image, "tiller-image", "i", "", "override tiller image")
f.BoolVar(&i.canary, "canary-image", false, "use the canary tiller image")
f.BoolVarP(&i.clientOnly, "client-only", "c", false, "if set does not install tiller")
return cmd return cmd
} }
......
...@@ -121,14 +121,14 @@ func newInspectCmd(c helm.Interface, out io.Writer) *cobra.Command { ...@@ -121,14 +121,14 @@ func newInspectCmd(c helm.Interface, out io.Writer) *cobra.Command {
chartSubCmd.Flags().BoolVar(&insp.verify, vflag, false, vdesc) chartSubCmd.Flags().BoolVar(&insp.verify, vflag, false, vdesc)
kflag := "keyring" kflag := "keyring"
kdesc := "the path to the keyring containing public verification keys" kdesc := "path to the keyring containing public verification keys"
kdefault := defaultKeyring() kdefault := defaultKeyring()
inspectCommand.Flags().StringVar(&insp.keyring, kflag, kdefault, kdesc) inspectCommand.Flags().StringVar(&insp.keyring, kflag, kdefault, kdesc)
valuesSubCmd.Flags().StringVar(&insp.keyring, kflag, kdefault, kdesc) valuesSubCmd.Flags().StringVar(&insp.keyring, kflag, kdefault, kdesc)
chartSubCmd.Flags().StringVar(&insp.keyring, kflag, kdefault, kdesc) chartSubCmd.Flags().StringVar(&insp.keyring, kflag, kdefault, kdesc)
verflag := "version" verflag := "version"
verdesc := "the version of the chart. By default, the newest chart is shown." verdesc := "version of the chart. By default, the newest chart is shown"
inspectCommand.Flags().StringVar(&insp.version, verflag, "", verdesc) inspectCommand.Flags().StringVar(&insp.version, verflag, "", verdesc)
valuesSubCmd.Flags().StringVar(&insp.version, verflag, "", verdesc) valuesSubCmd.Flags().StringVar(&insp.version, verflag, "", verdesc)
chartSubCmd.Flags().StringVar(&insp.version, verflag, "", verdesc) chartSubCmd.Flags().StringVar(&insp.version, verflag, "", verdesc)
......
...@@ -126,9 +126,9 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { ...@@ -126,9 +126,9 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command {
f := cmd.Flags() f := cmd.Flags()
f.StringVarP(&inst.valuesFile, "values", "f", "", "specify values in a YAML file") f.StringVarP(&inst.valuesFile, "values", "f", "", "specify values in a YAML file")
f.StringVarP(&inst.name, "name", "n", "", "the release name. If unspecified, it will autogenerate one for you") f.StringVarP(&inst.name, "name", "n", "", "release name. If unspecified, it will autogenerate one for you")
// TODO use kubeconfig default // TODO use kubeconfig default
f.StringVar(&inst.namespace, "namespace", "default", "the namespace to install the release into") f.StringVar(&inst.namespace, "namespace", "default", "namespace to install the release into")
f.BoolVar(&inst.dryRun, "dry-run", false, "simulate an install") f.BoolVar(&inst.dryRun, "dry-run", false, "simulate an install")
f.BoolVar(&inst.disableHooks, "no-hooks", false, "prevent hooks from running during install") f.BoolVar(&inst.disableHooks, "no-hooks", false, "prevent hooks from running during install")
f.BoolVar(&inst.replace, "replace", false, "re-use the given name, even if that name is already used. This is unsafe in production") f.BoolVar(&inst.replace, "replace", false, "re-use the given name, even if that name is already used. This is unsafe in production")
...@@ -136,7 +136,8 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { ...@@ -136,7 +136,8 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command {
f.StringVar(&inst.nameTemplate, "name-template", "", "specify template used to name the release") f.StringVar(&inst.nameTemplate, "name-template", "", "specify template used to name the release")
f.BoolVar(&inst.verify, "verify", false, "verify the package before installing it") f.BoolVar(&inst.verify, "verify", false, "verify the package before installing it")
f.StringVar(&inst.keyring, "keyring", defaultKeyring(), "location of public keys used for verification") f.StringVar(&inst.keyring, "keyring", defaultKeyring(), "location of public keys used for verification")
f.StringVar(&inst.version, "version", "", "specify the exact chart version to install. If this is not specified, the latest version is installed.") f.StringVar(&inst.version, "version", "", "specify the exact chart version to install. If this is not specified, the latest version is installed")
return cmd return cmd
} }
......
...@@ -63,7 +63,9 @@ func newLintCmd(out io.Writer) *cobra.Command { ...@@ -63,7 +63,9 @@ func newLintCmd(out io.Writer) *cobra.Command {
return l.run() return l.run()
}, },
} }
cmd.Flags().BoolVar(&l.strict, "strict", false, "fail on lint warnings") cmd.Flags().BoolVar(&l.strict, "strict", false, "fail on lint warnings")
return cmd return cmd
} }
......
...@@ -77,6 +77,7 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -77,6 +77,7 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command {
out: out, out: out,
client: client, client: client,
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "list [flags] [FILTER]", Use: "list [flags] [FILTER]",
Short: "list releases", Short: "list releases",
...@@ -93,18 +94,20 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -93,18 +94,20 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command {
return list.run() return list.run()
}, },
} }
f := cmd.Flags() f := cmd.Flags()
f.BoolVarP(&list.short, "short", "q", false, "output short (quiet) listing format") f.BoolVarP(&list.short, "short", "q", false, "output short (quiet) listing format")
f.BoolVarP(&list.byDate, "date", "d", false, "sort by release date") f.BoolVarP(&list.byDate, "date", "d", false, "sort by release date")
f.BoolVarP(&list.sortDesc, "reverse", "r", false, "reverse the sort order") f.BoolVarP(&list.sortDesc, "reverse", "r", false, "reverse the sort order")
f.IntVarP(&list.limit, "max", "m", 256, "maximum number of releases to fetch") f.IntVarP(&list.limit, "max", "m", 256, "maximum number of releases to fetch")
f.StringVarP(&list.offset, "offset", "o", "", "the next release name in the list, used to offset from start value") f.StringVarP(&list.offset, "offset", "o", "", "next release name in the list, used to offset from start value")
f.BoolVar(&list.all, "all", false, "show all releases, not just the ones marked DEPLOYED") f.BoolVar(&list.all, "all", false, "show all releases, not just the ones marked DEPLOYED")
f.BoolVar(&list.deleted, "deleted", false, "show deleted releases") f.BoolVar(&list.deleted, "deleted", false, "show deleted releases")
f.BoolVar(&list.deployed, "deployed", false, "show deployed releases. If no other is specified, this will be automatically enabled") f.BoolVar(&list.deployed, "deployed", false, "show deployed releases. If no other is specified, this will be automatically enabled")
f.BoolVar(&list.failed, "failed", false, "show failed releases") f.BoolVar(&list.failed, "failed", false, "show failed releases")
// TODO: Do we want this as a feature of 'helm list'? // TODO: Do we want this as a feature of 'helm list'?
//f.BoolVar(&list.superseded, "history", true, "show historical releases") //f.BoolVar(&list.superseded, "history", true, "show historical releases")
return cmd return cmd
} }
......
...@@ -58,6 +58,7 @@ func newPackageCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -58,6 +58,7 @@ func newPackageCmd(client helm.Interface, out io.Writer) *cobra.Command {
pkg := &packageCmd{ pkg := &packageCmd{
out: out, out: out,
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "package [flags] [CHART_PATH] [...]", Use: "package [flags] [CHART_PATH] [...]",
Short: "package a chart directory into a chart archive", Short: "package a chart directory into a chart archive",
...@@ -88,8 +89,8 @@ func newPackageCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -88,8 +89,8 @@ func newPackageCmd(client helm.Interface, out io.Writer) *cobra.Command {
f := cmd.Flags() f := cmd.Flags()
f.BoolVar(&pkg.save, "save", true, "save packaged chart to local chart repository") f.BoolVar(&pkg.save, "save", true, "save packaged chart to local chart repository")
f.BoolVar(&pkg.sign, "sign", false, "use a PGP private key to sign this package") f.BoolVar(&pkg.sign, "sign", false, "use a PGP private key to sign this package")
f.StringVar(&pkg.key, "key", "", "the name of the key to use when signing. Used if --sign is true.") f.StringVar(&pkg.key, "key", "", "name of the key to use when signing. Used if --sign is true")
f.StringVar(&pkg.keyring, "keyring", defaultKeyring(), "the location of a public keyring") f.StringVar(&pkg.keyring, "keyring", defaultKeyring(), "location of a public keyring")
return cmd return cmd
} }
......
...@@ -64,6 +64,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { ...@@ -64,6 +64,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command {
f.Int32Var(&rollback.version, "revision", 0, "revision to deploy") f.Int32Var(&rollback.version, "revision", 0, "revision to deploy")
f.BoolVar(&rollback.dryRun, "dry-run", false, "simulate a rollback") f.BoolVar(&rollback.dryRun, "dry-run", false, "simulate a rollback")
f.BoolVar(&rollback.disableHooks, "no-hooks", false, "prevent hooks from running during rollback") f.BoolVar(&rollback.disableHooks, "no-hooks", false, "prevent hooks from running during rollback")
return cmd return cmd
} }
......
...@@ -61,7 +61,7 @@ func newSearchCmd(out io.Writer) *cobra.Command { ...@@ -61,7 +61,7 @@ func newSearchCmd(out io.Writer) *cobra.Command {
f := cmd.Flags() f := cmd.Flags()
f.BoolVarP(&sc.regexp, "regexp", "r", false, "use regular expressions for searching") f.BoolVarP(&sc.regexp, "regexp", "r", false, "use regular expressions for searching")
f.BoolVarP(&sc.versions, "versions", "l", false, "show the long listing, with each version of each chart on its own line.") f.BoolVarP(&sc.versions, "versions", "l", false, "show the long listing, with each version of each chart on its own line")
return cmd return cmd
} }
......
...@@ -48,8 +48,10 @@ func newServeCmd(out io.Writer) *cobra.Command { ...@@ -48,8 +48,10 @@ func newServeCmd(out io.Writer) *cobra.Command {
return srv.run() return srv.run()
}, },
} }
cmd.Flags().StringVar(&srv.repoPath, "repo-path", helmpath.Home(homePath()).LocalRepository(), "The local directory path from which to serve charts.")
cmd.Flags().StringVar(&srv.address, "address", "localhost:8879", "The address to listen on.") f := cmd.Flags()
f.StringVar(&srv.repoPath, "repo-path", helmpath.Home(homePath()).LocalRepository(), "local directory path from which to serve charts")
f.StringVar(&srv.address, "address", "localhost:8879", "address to listen on")
return cmd return cmd
} }
......
...@@ -43,6 +43,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -43,6 +43,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command {
out: out, out: out,
client: client, client: client,
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "status [flags] RELEASE_NAME", Use: "status [flags] RELEASE_NAME",
Short: "displays the status of the named release", Short: "displays the status of the named release",
...@@ -60,7 +61,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -60,7 +61,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command {
}, },
} }
cmd.PersistentFlags().Int32Var(&status.version, "revision", 0, "If set, display the status of the named release with revision") cmd.PersistentFlags().Int32Var(&status.version, "revision", 0, "if set, display the status of the named release with revision")
return cmd return cmd
} }
......
...@@ -89,10 +89,10 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -89,10 +89,10 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command {
f.Var(upgrade.values, "set", "set values on the command line. Separate values with commas: key1=val1,key2=val2") f.Var(upgrade.values, "set", "set values on the command line. Separate values with commas: key1=val1,key2=val2")
f.BoolVar(&upgrade.disableHooks, "disable-hooks", false, "disable pre/post upgrade hooks") f.BoolVar(&upgrade.disableHooks, "disable-hooks", false, "disable pre/post upgrade hooks")
f.BoolVar(&upgrade.verify, "verify", false, "verify the provenance of the chart before upgrading") f.BoolVar(&upgrade.verify, "verify", false, "verify the provenance of the chart before upgrading")
f.StringVar(&upgrade.keyring, "keyring", defaultKeyring(), "the path to the keyring that contains public singing keys") f.StringVar(&upgrade.keyring, "keyring", defaultKeyring(), "path to the keyring that contains public singing keys")
f.BoolVarP(&upgrade.install, "install", "i", false, "if a release by this name doesn't already exist, run an install") f.BoolVarP(&upgrade.install, "install", "i", false, "if a release by this name doesn't already exist, run an install")
f.StringVar(&upgrade.namespace, "namespace", "default", "the namespace to install the release into (only used if --install is set)") f.StringVar(&upgrade.namespace, "namespace", "default", "namespace to install the release into (only used if --install is set)")
f.StringVar(&upgrade.version, "version", "", "specify the exact chart version to use. If this is not specified, the latest version is used.") f.StringVar(&upgrade.version, "version", "", "specify the exact chart version to use. If this is not specified, the latest version is used")
return cmd return cmd
} }
......
...@@ -59,7 +59,7 @@ func newVerifyCmd(out io.Writer) *cobra.Command { ...@@ -59,7 +59,7 @@ func newVerifyCmd(out io.Writer) *cobra.Command {
} }
f := cmd.Flags() f := cmd.Flags()
f.StringVar(&vc.keyring, "keyring", defaultKeyring(), "the keyring containing public keys.") f.StringVar(&vc.keyring, "keyring", defaultKeyring(), "keyring containing public keys")
return cmd return cmd
} }
......
...@@ -39,6 +39,7 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { ...@@ -39,6 +39,7 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command {
client: c, client: c,
out: out, out: out,
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "version", Use: "version",
Short: "print the client/server version information", Short: "print the client/server version information",
...@@ -48,6 +49,7 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { ...@@ -48,6 +49,7 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command {
return version.run() return version.run()
}, },
} }
return cmd return cmd
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment