Skip to content

Commit 51f9034

Browse files
committed
search for BUILD_VERSION only on current branch history
1 parent 9338816 commit 51f9034

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Makefile

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ PREFIX?="/"
1010
PID_DIR = $(PREFIX)"/var/run/"
1111
BINARY_NAME=crowdsec-custom-bouncer
1212

13-
1413
#Current versioning information from env
15-
BUILD_VERSION?="$(shell git describe --tags `git rev-list --tags --max-count=1`)"
14+
BUILD_VERSION?="$(shell git describe --tags)"
1615
BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')"
1716
BUILD_TIMESTAMP=$(shell date +%F"_"%T)
1817
BUILD_TAG="$(shell git rev-parse HEAD)"
18+
1919
export LD_OPTS=-ldflags "-s -w -X github.com/crowdsecurity/crowdsec-custom-bouncer/pkg/version.Version=$(BUILD_VERSION) \
2020
-X github.com/crowdsecurity/crowdsec-custom-bouncer/pkg/version.BuildDate=$(BUILD_TIMESTAMP) \
2121
-X github.com/crowdsecurity/crowdsec-custom-bouncer/pkg/version.Tag=$(BUILD_TAG) \
2222
-X github.com/crowdsecurity/crowdsec-custom-bouncer/pkg/version.GoVersion=$(BUILD_GOVERSION)"
2323

2424
RELDIR = "crowdsec-custom-bouncer-${BUILD_VERSION}"
2525

26-
2726
all: clean test build
2827

2928
static: clean
@@ -40,7 +39,6 @@ clean:
4039
@rm -rf ${RELDIR}
4140
@rm -f crowdsec-custom-bouncer.tgz || ""
4241

43-
4442
.PHONY: release
4543
release: build
4644
@if [ -z ${BUILD_VERSION} ] ; then BUILD_VERSION="local" ; fi
@@ -56,4 +54,4 @@ release: build
5654
@chmod +x $(RELDIR)/uninstall.sh
5755
@chmod +x $(RELDIR)/upgrade.sh
5856
@tar cvzf crowdsec-custom-bouncer.tgz $(RELDIR)
59-
57+

0 commit comments

Comments
 (0)