Remove version command, introduce --version option #619
Conversation
internal/commands/root.go
Outdated
@@ -24,6 +27,12 @@ func NewRootCmd(use string, dockerCli command.Cli) *cobra.Command { | |||
Use: use, | |||
Annotations: map[string]string{"experimentalCLI": "true"}, | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: empty line
Codecov Report
@@ Coverage Diff @@
## master #619 +/- ##
=======================================
Coverage 72.29% 72.29%
=======================================
Files 51 51
Lines 2660 2660
=======================================
Hits 1923 1923
Misses 497 497
Partials 240 240 Continue to review full report at Codecov.
|
34db651
to
28789cc
Compare
internal/commands/root.go
Outdated
@@ -24,6 +27,11 @@ func NewRootCmd(use string, dockerCli command.Cli) *cobra.Command { | |||
Use: use, | |||
Annotations: map[string]string{"experimentalCLI": "true"}, | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
if showversion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: showVersion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit but LGTM
internal/commands/root.go
Outdated
@@ -24,6 +27,11 @@ func NewRootCmd(use string, dockerCli command.Cli) *cobra.Command { | |||
Use: use, | |||
Annotations: map[string]string{"experimentalCLI": "true"}, | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
if showVersion:q { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:x
is a shortcut for w+q in vim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pretend this never happened
internal/commands/uninstall.go
Outdated
@@ -20,9 +20,10 @@ func uninstallCmd(dockerCli command.Cli) *cobra.Command { | |||
var opts uninstallOptions | |||
|
|||
cmd := &cobra.Command{ | |||
Use: "uninstall INSTALLATION_NAME [--target-context TARGET_CONTEXT] [OPTIONS]", | |||
Use: "rm INSTALLATION_NAME [--target-context TARGET_CONTEXT] [OPTIONS]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this meant to be pushed with the version change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems I messed up my branches :'(
internal/commands/uninstall.go
Outdated
@@ -20,9 +20,10 @@ func uninstallCmd(dockerCli command.Cli) *cobra.Command { | |||
var opts uninstallOptions | |||
|
|||
cmd := &cobra.Command{ | |||
Use: "uninstall INSTALLATION_NAME [--target-context TARGET_CONTEXT] [OPTIONS]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hunk does not seem to be part of this PR
internal/version.go
Outdated
} | ||
|
||
if Experimental == "on" { | ||
res = append(res, fmt.Sprintf("Experimental: %s", Experimental)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to be more explicit here so that people aren't confused with the CLI experimental. Maybe Experimental app build
?
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- What I did
Replaced
version
command with a--version
option- How I did it
Moved code around
- How to verify it
run
docker app --version
- Description for the changelog
Remove version command, introduce --version option
- A picture of a cute animal (not mandatory but encouraged)