chore(storage-naming): introduce optional version flag (--version) to helm {get, status}

pull/1092/head
fibonacci1729 9 years ago
parent 14f5641905
commit bc2826c813

@ -48,6 +48,7 @@ type getCmd struct {
release string release string
out io.Writer out io.Writer
client helm.Interface client helm.Interface
version int32
} }
func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
@ -71,6 +72,9 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
return get.run() return get.run()
}, },
} }
cmd.PersistentFlags().Int32Var(&get.version, "version", 0, "version of release")
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))

@ -34,6 +34,7 @@ type statusCmd struct {
release string release string
out io.Writer out io.Writer
client helm.Interface client helm.Interface
version int32
} }
func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command {
@ -57,6 +58,9 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command {
return status.run() return status.run()
}, },
} }
cmd.PersistentFlags().Int32Var(&status.version, "version", 0, "version of release")
return cmd return cmd
} }

Loading…
Cancel
Save