Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ go.work

dist/
tracing/commit.txt
cmd/commit.txt
12 changes: 9 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"context"
_ "embed"
"errors"
"fmt"
"net/http"
Expand All @@ -27,11 +28,16 @@ var logLevel string

var minStatusInterval = durationpb.New(250 * time.Millisecond)

//go:generate sh -c "echo -n $(git describe --long) > commit.txt"
//go:embed commit.txt
var cliVersion string

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "ovm-cli",
Short: "A CLI to interact with the overmind API",
Long: `The ovm-cli allows direct access to the overmind API`,
Use: "ovm-cli",
Short: "A CLI to interact with the overmind API",
Long: `The ovm-cli allows direct access to the overmind API`,
Version: cliVersion,
PreRun: func(cmd *cobra.Command, args []string) {
// Bind these to viper
err := viper.BindPFlags(cmd.Flags())
Expand Down