mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
Update version variable
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
3467df6b69
commit
691ab84326
@ -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
|
||||
)
|
||||
|
@ -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())
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user