constants.go: set version at compile time
This commit is contained in:
parent
f09a619d41
commit
36204ff81b
@ -26,11 +26,11 @@ clean:
|
||||
|
||||
devel-go:
|
||||
GO111MODULE=on go mod vendor
|
||||
GO111MODULE=on go build -mod=vendor -v -o $(GO_DEVEL_BUILD_BINARY)
|
||||
GO111MODULE=on go build -mod=vendor -v -o $(GO_DEVEL_BUILD_BINARY) -ldflags "-X main.version=$(shell git describe --tags)"
|
||||
|
||||
prod-go:
|
||||
GO111MODULE=on go mod vendor
|
||||
GO111MODULE=on go build -mod=vendor -v -o $(GO_PROD_BUILD_BINARY)
|
||||
GO111MODULE=on go build -mod=vendor -v -o $(GO_PROD_BUILD_BINARY) -ldflags "-X main.version=$(shell git describe --tags)"
|
||||
|
||||
test-go:
|
||||
GO111MODULE=on go mod vendor
|
||||
|
@ -1,3 +1,3 @@
|
||||
package main
|
||||
|
||||
var version = "v1.7.0"
|
||||
var version string
|
||||
|
Loading…
Reference in New Issue
Block a user