Skip to content

Commit

Permalink
fixed version control
Browse files Browse the repository at this point in the history
  • Loading branch information
musanmaz committed Aug 13, 2024
1 parent 15ad626 commit 2134d21
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)

const version = "1.2.3"
const version = "1.2.4"

var (
consulAddr string
Expand Down
19 changes: 19 additions & 0 deletions cmd/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"fmt"

"github.com/spf13/cobra"
)

var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of Consul IO",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Consul IO CLI version %s\n", version)
},
}

func init() {
rootCmd.AddCommand(versionCmd)
}

0 comments on commit 2134d21

Please sign in to comment.