Update version variable

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2022-06-01 14:21:18 +02:00 committed by Daniel Weiße
parent 3467df6b69
commit 691ab84326
5 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@ add_custom_target(coordinator ALL
#
add_custom_target(cli ALL
CGO_ENABLED=0 go build -o ${CMAKE_BINARY_DIR}/constellation -buildvcs=false -tags=gcp -ldflags "-buildid='' -X github.com/edgelesssys/constellation/internal/constants.CliVersion=${PROJECT_VERSION}"
CGO_ENABLED=0 go build -o ${CMAKE_BINARY_DIR}/constellation -buildvcs=false -tags=gcp -ldflags "-buildid='' -X github.com/edgelesssys/constellation/internal/constants.VersionInfo=${PROJECT_VERSION}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cli
BYPRODUCTS constellation
)

View File

@ -25,7 +25,7 @@ func main() {
klog.InitFlags(nil)
flag.Parse()
klog.V(2).Infof("\nConstellation Node Activation Service\nVersion: %s\nRunning on: %s", constants.VersionInfo, *provider)
klog.V(2).Infof("\nConstellation Node Activation Service\nVersion: v%s\nRunning on: %s", constants.VersionInfo, *provider)
handler := file.NewHandler(afero.NewOsFs())

View File

@ -13,7 +13,7 @@ func NewVersionCmd() *cobra.Command {
Long: "Display version of this CLI.",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
cmd.Printf("CLI Version: v%s \n", constants.CliVersion)
cmd.Printf("CLI Version: v%s \n", constants.VersionInfo)
},
}
return cmd

View File

@ -21,5 +21,5 @@ func TestVersionCmd(t *testing.T) {
s, err := io.ReadAll(b)
assert.NoError(err)
assert.Contains(string(s), constants.CliVersion)
assert.Contains(string(s), constants.VersionInfo)
}

View File

@ -85,5 +85,5 @@ const (
WireguardAdminMTU = 1300
)
// CliVersion is the version of the CLI. Left as a separate variable to allow override during build.
var CliVersion = "0.0.0"
// VersionInfo is the version of a binary. Left as a separate variable to allow override during build.
var VersionInfo = "0.0.0"