fix(helm): s/version/revision/

pull/1248/head
Adam Reese 8 years ago
parent 5a5a44ec17
commit 1db7bd649f

@ -73,7 +73,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
}, },
} }
cmd.PersistentFlags().Int32Var(&get.version, "version", 0, "get the named release with version") cmd.PersistentFlags().Int32Var(&get.version, "revision", 0, "get the named release with revision")
cmd.AddCommand(newGetValuesCmd(nil, out)) cmd.AddCommand(newGetValuesCmd(nil, out))
cmd.AddCommand(newGetManifestCmd(nil, out)) cmd.AddCommand(newGetManifestCmd(nil, out))
@ -81,7 +81,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
return cmd return cmd
} }
var getTemplate = `VERSION: {{.Release.Version}} var getTemplate = `REVISION: {{.Release.Version}}
RELEASED: {{.ReleaseDate}} RELEASED: {{.ReleaseDate}}
CHART: {{.Release.Chart.Metadata.Name}}-{{.Release.Chart.Metadata.Version}} CHART: {{.Release.Chart.Metadata.Name}}-{{.Release.Chart.Metadata.Version}}
USER-SUPPLIED VALUES: USER-SUPPLIED VALUES:

@ -29,7 +29,7 @@ func TestGetCmd(t *testing.T) {
name: "get with a release", name: "get with a release",
resp: releaseMock(&releaseOptions{name: "thomas-guide"}), resp: releaseMock(&releaseOptions{name: "thomas-guide"}),
args: []string{"thomas-guide"}, args: []string{"thomas-guide"},
expected: "VERSION: 1\nRELEASED: (.*)\nCHART: foo-0.1.0-beta.1\nUSER-SUPPLIED VALUES:\nname: \"value\"\nCOMPUTED VALUES:\nname: value\n\nHOOKS:\n---\n# pre-install-hook\n" + mockHookTemplate + "\nMANIFEST:", expected: "REVISION: 1\nRELEASED: (.*)\nCHART: foo-0.1.0-beta.1\nUSER-SUPPLIED VALUES:\nname: \"value\"\nCOMPUTED VALUES:\nname: value\n\nHOOKS:\n---\n# pre-install-hook\n" + mockHookTemplate + "\nMANIFEST:",
}, },
{ {
name: "get requires release name arg", name: "get requires release name arg",

@ -191,7 +191,7 @@ func (l *listCmd) statusCodes() []release.Status_Code {
func formatList(rels []*release.Release) string { func formatList(rels []*release.Release) string {
table := uitable.New() table := uitable.New()
table.MaxColWidth = 30 table.MaxColWidth = 30
table.AddRow("NAME", "VERSION", "UPDATED", "STATUS", "CHART") table.AddRow("NAME", "REVISION", "UPDATED", "STATUS", "CHART")
for _, r := range rels { for _, r := range rels {
c := fmt.Sprintf("%s-%s", r.Chart.Metadata.Name, r.Chart.Metadata.Version) c := fmt.Sprintf("%s-%s", r.Chart.Metadata.Name, r.Chart.Metadata.Version)
t := timeconv.String(r.Info.LastDeployed) t := timeconv.String(r.Info.LastDeployed)

@ -45,7 +45,7 @@ func TestListCmd(t *testing.T) {
resp: []*release.Release{ resp: []*release.Release{
releaseMock(&releaseOptions{name: "atlas"}), releaseMock(&releaseOptions{name: "atlas"}),
}, },
expected: "NAME \tVERSION\tUPDATED \tSTATUS \tCHART \natlas\t1 \t(.*)\tDEPLOYED\tfoo-0.1.0-beta.1\n", expected: "NAME \tREVISION\tUPDATED \tSTATUS \tCHART \natlas\t1 \t(.*)\tDEPLOYED\tfoo-0.1.0-beta.1\n",
}, },
{ {
name: "with a release, multiple flags", name: "with a release, multiple flags",

@ -60,7 +60,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command {
}, },
} }
cmd.PersistentFlags().Int32Var(&status.version, "version", 0, "If set, display the status of the named release with version") cmd.PersistentFlags().Int32Var(&status.version, "revision", 0, "If set, display the status of the named release with revision")
return cmd return cmd
} }

Loading…
Cancel
Save