Skip to content

Commit 5018b18

Browse files
committed
Fix binary version problem
Signed-off-by: Antonio Jesus Navarro Perez <[email protected]>
1 parent dad8555 commit 5018b18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ static-package:
3030
docker rm gitbase-temp
3131

3232
# target used in the Dockerfile to build the static binary
33-
static-build: VERSION = $(shell git describe --exact-match --tags 2>/dev/null || dev-$(git rev-parse --short HEAD)$(test -n "`git status --porcelain`" && echo "-dirty" || true))
34-
static-build: LD_FLAGS += -linkmode external -extldflags '-static -lz' -X main.version=$(VERSION || echo "undefined") -X main.build=$(date +"%m-%d-%Y_%H_%M_%S") -X main.commit=$(git rev-parse --short HEAD) -s -w
33+
static-build: VERSION ?= $(shell git describe --exact-match --tags 2>/dev/null || "dev-$(git rev-parse --short HEAD)$(test -n "`git status --porcelain`" && echo "-dirty" || true)")
34+
static-build: LD_FLAGS += -linkmode external -extldflags '-static -lz' -s -w
3535
static-build: GO_BUILD_ARGS += -tags oniguruma
3636
static-build: GO_BUILD_PATH ?= github.com/src-d/gitbase/...
3737
static-build:

0 commit comments

Comments
 (0)