Explorar o código

allow BUILD_TAG to be overridden when building outside a git tree (#1058)

mmetc %!s(int64=3) %!d(string=hai) anos
pai
achega
2a1a96c1a7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Makefile

+ 1 - 1
Makefile

@@ -42,7 +42,7 @@ BUILD_VERSION?="$(shell git describe --tags `git rev-list --tags --max-count=1`)
 BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -E 's/[go]+//g')"
 BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -E 's/[go]+//g')"
 BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeName)
 BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeName)
 BUILD_TIMESTAMP=$(shell date +%F"_"%T)
 BUILD_TIMESTAMP=$(shell date +%F"_"%T)
-BUILD_TAG="$(shell git rev-parse HEAD)"
+BUILD_TAG?="$(shell git rev-parse HEAD)"
 
 
 export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
 export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.System=$(SYSTEM) \
 -X github.com/crowdsecurity/crowdsec/pkg/cwversion.System=$(SYSTEM) \