File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,4 @@ go.work
2222
2323dist /
2424tracing /commit.txt
25+ cmd /commit.txt
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package cmd
22
33import (
44 "context"
5+ _ "embed"
56 "errors"
67 "fmt"
78 "net/http"
@@ -27,11 +28,16 @@ var logLevel string
2728
2829var minStatusInterval = durationpb .New (250 * time .Millisecond )
2930
31+ //go:generate sh -c "echo -n $(git describe --long) > commit.txt"
32+ //go:embed commit.txt
33+ var cliVersion string
34+
3035// rootCmd represents the base command when called without any subcommands
3136var rootCmd = & cobra.Command {
32- Use : "ovm-cli" ,
33- Short : "A CLI to interact with the overmind API" ,
34- Long : `The ovm-cli allows direct access to the overmind API` ,
37+ Use : "ovm-cli" ,
38+ Short : "A CLI to interact with the overmind API" ,
39+ Long : `The ovm-cli allows direct access to the overmind API` ,
40+ Version : cliVersion ,
3541 PreRun : func (cmd * cobra.Command , args []string ) {
3642 // Bind these to viper
3743 err := viper .BindPFlags (cmd .Flags ())
You can’t perform that action at this time.
0 commit comments