File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ package main
1616
1717import "github.com/warrant-dev/warrant-cli/internal/cmd"
1818
19+ var version = "dev"
20+
1921func main () {
22+ cmd .SetVersion (version )
2023 cmd .Execute ()
2124}
Original file line number Diff line number Diff line change @@ -21,15 +21,16 @@ import (
2121 "github.com/warrant-dev/warrant-go/v5"
2222)
2323
24- var version = ""
25-
2624var cmdConfig * config.Config
2725
2826var rootCmd = & cobra.Command {
29- Use : "warrant" ,
30- Short : "Warrant CLI" ,
31- Long : `The Warrant CLI is a tool to interact with Warrant via the command line.` ,
32- Version : version ,
27+ Use : "warrant" ,
28+ Short : "Warrant CLI" ,
29+ Long : `The Warrant CLI is a tool to interact with Warrant via the command line.` ,
30+ }
31+
32+ func SetVersion (version string ) {
33+ rootCmd .Version = version
3334}
3435
3536func Execute () {
You can’t perform that action at this time.
0 commit comments