From 84a787b5383aa9cb9808a1555bff6f236b83e89e Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Tue, 14 Feb 2023 08:30:10 -0500 Subject: [PATCH] cli: add name of build type to version cmd output (#1179) Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- cli/internal/cmd/version.go | 2 +- internal/constants/{keys_enterprise.go => enterprise.go} | 3 +++ internal/constants/{keys_oss.go => oss.go} | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) rename internal/constants/{keys_enterprise.go => enterprise.go} (73%) rename internal/constants/{keys_oss.go => oss.go} (75%) diff --git a/cli/internal/cmd/version.go b/cli/internal/cmd/version.go index 83dffa261..1c801123b 100644 --- a/cli/internal/cmd/version.go +++ b/cli/internal/cmd/version.go @@ -34,7 +34,7 @@ func runVersion(cmd *cobra.Command, args []string) { commit, state, date, goVersion, compiler, platform := parseBuildInfo(buildInfo) - cmd.Printf("Version:\t%s\n", constants.VersionInfo) + cmd.Printf("Version:\t%s (%s)\n", constants.VersionInfo, constants.VersionBuild) cmd.Printf("GitCommit:\t%s\n", commit) cmd.Printf("GitTreeState:\t%s\n", state) cmd.Printf("BuildDate:\t%s\n", date) diff --git a/internal/constants/keys_enterprise.go b/internal/constants/enterprise.go similarity index 73% rename from internal/constants/keys_enterprise.go rename to internal/constants/enterprise.go index 2f03dd7a6..1129698d8 100644 --- a/internal/constants/keys_enterprise.go +++ b/internal/constants/enterprise.go @@ -14,3 +14,6 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEf8F1hpmwE+YCFXzjGtaQcrL6XZVT JmEe5iSLvG1SyQSAew7WdMKF6o9t8e2TFuCkzlOhhlws2OHWbiFZnFWCFw== -----END PUBLIC KEY----- ` + +// VersionBuild is the category of the current build. +const VersionBuild = "Enterprise build; see documentation for license agreement" diff --git a/internal/constants/keys_oss.go b/internal/constants/oss.go similarity index 75% rename from internal/constants/keys_oss.go rename to internal/constants/oss.go index e40d681de..f9c4bb72e 100644 --- a/internal/constants/keys_oss.go +++ b/internal/constants/oss.go @@ -14,3 +14,6 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAELcPl4Ik+qZuH4K049wksoXK/Os3Z b92PDCpM7FZAINQF88s1TZS/HmRXYk62UJ4eqPduvUnJmXhNikhLbMi6fw== -----END PUBLIC KEY----- ` + +// VersionBuild is the category of the current build. +const VersionBuild = "Open-source software build; AGPL-3.0-only applies"