Skip to content

Commit 4348b95

Browse files
committed
makefile: fix adding version in generated binaries
Signed-off-by: Miguel Molina <[email protected]>
1 parent ca3ad0d commit 4348b95

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Package configuration
22
PROJECT = gitbase
33
COMMANDS = cmd/gitbase
4-
GO_BUILD_ARGS += -tags mysql_go_regex
54

65
# Including ci Makefile
76
CI_REPOSITORY ?= https://github.com/src-d/ci.git
@@ -17,6 +16,8 @@ $(MAKEFILE):
1716

1817
-include $(MAKEFILE)
1918

19+
GO_BUILD_ARGS += -tags mysql_go_regex
20+
2021
upgrade:
2122
go run tools/rev-upgrade/main.go -p $(UPGRADE_PRJ) -r $(UPGRADE_REV)
2223

@@ -33,10 +34,9 @@ static-package:
3334
# target used in the Dockerfile to build the static binary
3435
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)")
3536
static-build: LD_FLAGS += -linkmode external -extldflags '-static -lz' -s -w
36-
static-build: GO_BUILD_ARGS += -tags mysql_go_regex
3737
static-build: GO_BUILD_PATH ?= github.com/src-d/gitbase/...
3838
static-build:
39-
go build -ldflags="$(LD_FLAGS)" -v $(GO_BUILD_ARGS) $(GO_BUILD_PATH)
39+
go build -ldflags="$(LD_FLAGS)" -v -tags mysql_go_regex $(GO_BUILD_PATH)
4040

4141
ci-e2e: packages
4242
go test ./e2e -gitbase-version="$(TRAVIS_TAG)" \

e2e/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestMain(m *testing.M) {
3737

3838
path, err := exec.LookPath(*bin)
3939
if err != nil {
40-
fmt.Println("gitbase-bin not provided")
40+
fmt.Println("gitbase-bin not provided:", err)
4141
if *mustRun {
4242
os.Exit(1)
4343
} else {

0 commit comments

Comments
 (0)