We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03d19d9 commit bd7ec42Copy full SHA for bd7ec42
cmd/root.go
@@ -15,7 +15,10 @@ var rootCmd = &cobra.Command{
15
Long: `The CodeGame CLI helps you develop CodeGame applications.`,
16
}
17
18
-func Execute() {
+func Execute(version string) {
19
+ rootCmd.SetVersionTemplate(`codegame-cli v{{.Version}}
20
+`)
21
+ rootCmd.Version = version
22
err := rootCmd.Execute()
23
if err != nil {
24
os.Exit(1)
main.go
@@ -24,7 +24,7 @@ const Version = "0.7.1"
25
func main() {
26
checkVersion()
27
- cmd.Execute()
+ cmd.Execute(Version)
28
29
30
// checkVersion prints a warning, if there is a newer version of codegame-cli available.
0 commit comments