Skip to content

Commit

Permalink
cli: add --version parameter
Browse files Browse the repository at this point in the history
The version variable will be set by goreleaser on build.
  • Loading branch information
fho committed Dec 1, 2023
1 parent c265f01 commit 7cd24c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ import (
"github.com/spf13/cobra"
)

// version is set via goreleaser
var version = "UNDEFINED"

func newRoot() *cobra.Command {
const shortDesc = "Visualize Dependencies and generate deployment orders"

root := &cobra.Command{
Short: shortDesc,
SilenceUsage: true,
Version: version,
}

root.AddCommand(newDeployOrder().Command)
Expand Down

0 comments on commit 7cd24c0

Please # to comment.