diff --git a/internal/build-info/build_info.go b/internal/build-info/build_info.go index 2a31f38ba..5227849de 100644 --- a/internal/build-info/build_info.go +++ b/internal/build-info/build_info.go @@ -1,6 +1,7 @@ package buildinfo import ( + "fmt" "runtime" ) @@ -38,3 +39,7 @@ func NewBuildInfo(version, branch, buildDate, buildUser, goVersion, revision str Revision: revision, } } + +func GetVersionWithCommit() string { + return fmt.Sprintf("%v %v", Version, Revision) +} diff --git a/internal/cli/root.go b/internal/cli/root.go index 97cb6a2a4..9003656b3 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -2,12 +2,11 @@ package cli import ( "context" - "os" - "github.com/auth0/auth0-cli/internal/ansi" "github.com/auth0/auth0-cli/internal/build-info" "github.com/auth0/auth0-cli/internal/display" "github.com/spf13/cobra" + "os" ) // Execute is the primary entrypoint of the CLI app. @@ -27,7 +26,7 @@ func Execute() { SilenceErrors: true, Short: "Supercharge your development workflow.", Long: "Supercharge your development workflow.\n" + getLogin(cli), - Version: buildinfo.Version, + Version: buildinfo.GetVersionWithCommit(), PersistentPreRunE: func(cmd *cobra.Command, args []string) error { // If the user is trying to login, no need to go