From 1db7bd649fac94747d6ca3de39fac3eb2e3213e3 Mon Sep 17 00:00:00 2001
From: Adam Reese <adam@reese.io>
Date: Wed, 28 Sep 2016 15:02:27 -0700
Subject: [PATCH] fix(helm): s/version/revision/

---
 cmd/helm/get.go       | 4 ++--
 cmd/helm/get_test.go  | 2 +-
 cmd/helm/list.go      | 2 +-
 cmd/helm/list_test.go | 2 +-
 cmd/helm/status.go    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cmd/helm/get.go b/cmd/helm/get.go
index 3c8beb26f..9402762c5 100644
--- a/cmd/helm/get.go
+++ b/cmd/helm/get.go
@@ -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(newGetManifestCmd(nil, out))
@@ -81,7 +81,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
 	return cmd
 }
 
-var getTemplate = `VERSION: {{.Release.Version}}
+var getTemplate = `REVISION: {{.Release.Version}}
 RELEASED: {{.ReleaseDate}}
 CHART: {{.Release.Chart.Metadata.Name}}-{{.Release.Chart.Metadata.Version}}
 USER-SUPPLIED VALUES:
diff --git a/cmd/helm/get_test.go b/cmd/helm/get_test.go
index 95ecffeb0..77d8d4d19 100644
--- a/cmd/helm/get_test.go
+++ b/cmd/helm/get_test.go
@@ -29,7 +29,7 @@ func TestGetCmd(t *testing.T) {
 			name:     "get with a release",
 			resp:     releaseMock(&releaseOptions{name: "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",
diff --git a/cmd/helm/list.go b/cmd/helm/list.go
index b4ec4498b..461bd89de 100644
--- a/cmd/helm/list.go
+++ b/cmd/helm/list.go
@@ -191,7 +191,7 @@ func (l *listCmd) statusCodes() []release.Status_Code {
 func formatList(rels []*release.Release) string {
 	table := uitable.New()
 	table.MaxColWidth = 30
-	table.AddRow("NAME", "VERSION", "UPDATED", "STATUS", "CHART")
+	table.AddRow("NAME", "REVISION", "UPDATED", "STATUS", "CHART")
 	for _, r := range rels {
 		c := fmt.Sprintf("%s-%s", r.Chart.Metadata.Name, r.Chart.Metadata.Version)
 		t := timeconv.String(r.Info.LastDeployed)
diff --git a/cmd/helm/list_test.go b/cmd/helm/list_test.go
index 70197cf02..06d64c1f9 100644
--- a/cmd/helm/list_test.go
+++ b/cmd/helm/list_test.go
@@ -45,7 +45,7 @@ func TestListCmd(t *testing.T) {
 			resp: []*release.Release{
 				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",
diff --git a/cmd/helm/status.go b/cmd/helm/status.go
index 356fdcb7d..30b572996 100644
--- a/cmd/helm/status.go
+++ b/cmd/helm/status.go
@@ -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
 }
-- 
GitLab