Skip to content

Commit

Permalink
fix(Version): update the version cmd
Browse files Browse the repository at this point in the history
- Update the text in the cmd

BREAKING CHANGE: No

Signed-off-by: Alejandro JNM <[email protected]>
  • Loading branch information
alejandrojnm committed May 13, 2020
1 parent 1740230 commit b4af168
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,25 @@ var (
Repository: "cli-go",
FixVersionStrFunc: latest.DeleteFrontV(),
}
res, _ := latest.Check(githubTag, strings.Replace(VersionCli, "v", "", 1))

switch {
case verbose:
fmt.Printf("Client version: %s\n", VersionCli)
fmt.Printf("Go version (client): %s\n", runtime.Version())
fmt.Printf("Git commit (client): %s\n", CommitCli)
fmt.Printf("OS/Arch (client): %s/%s\n", runtime.GOOS, runtime.GOARCH)

res, _ := latest.Check(githubTag, strings.Replace(VersionCli, "v", "", 1))

if res.Outdated {
utility.RedConfirm("A newer version (v%s) is available, please upgrade\n", res.Current)
}
case quiet:
fmt.Printf("%s\n", VersionCli)
default:
fmt.Printf("Civo CLI: %s\n", VersionCli)
fmt.Printf("Civo CLI %s\n", VersionCli)

res, _ := latest.Check(githubTag, strings.Replace(VersionCli, "v", "", 1))

if res.Outdated {
utility.RedConfirm("A newer version (v%s) is available, please upgrade\n", res.Current)
}
Expand Down

0 comments on commit b4af168

Please sign in to comment.