Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
d3f18394
Unverified
Commit
d3f18394
authored
Nov 05, 2019
by
Matthew Fisher
Committed by
GitHub
Nov 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6868 from bacongobbler/fix-6322
fix(version): implement `helm version -c`, mark as hidden
parents
f2ba0696
444d006f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
0 deletions
+12
-0
version-client-shorthand.txt
cmd/helm/testdata/output/version-client-shorthand.txt
+1
-0
version-client.txt
cmd/helm/testdata/output/version-client.txt
+1
-0
version.go
cmd/helm/version.go
+2
-0
version_test.go
cmd/helm/version_test.go
+8
-0
No files found.
cmd/helm/testdata/output/version-client-shorthand.txt
0 → 100644
View file @
d3f18394
version.BuildInfo{Version:"v3.0+unreleased", GitCommit:"", GitTreeState:"", GoVersion:""}
cmd/helm/testdata/output/version-client.txt
0 → 100644
View file @
d3f18394
version.BuildInfo{Version:"v3.0+unreleased", GitCommit:"", GitTreeState:"", GoVersion:""}
cmd/helm/version.go
View file @
d3f18394
...
...
@@ -61,6 +61,8 @@ func newVersionCmd(out io.Writer) *cobra.Command {
f
:=
cmd
.
Flags
()
f
.
BoolVar
(
&
o
.
short
,
"short"
,
false
,
"print the version number"
)
f
.
StringVar
(
&
o
.
template
,
"template"
,
""
,
"template for version string format"
)
f
.
BoolP
(
"client"
,
"c"
,
true
,
"display client version information"
)
f
.
MarkHidden
(
"client"
)
return
cmd
}
...
...
cmd/helm/version_test.go
View file @
d3f18394
...
...
@@ -32,6 +32,14 @@ func TestVersion(t *testing.T) {
name
:
"template"
,
cmd
:
"version --template='Version: {{.Version}}'"
,
golden
:
"output/version-template.txt"
,
},
{
name
:
"client"
,
cmd
:
"version --client"
,
golden
:
"output/version-client.txt"
,
},
{
name
:
"client shorthand"
,
cmd
:
"version -c"
,
golden
:
"output/version-client-shorthand.txt"
,
}}
runTestCmd
(
t
,
tests
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment