Skip to content

Commit

Permalink
makefile: fix adding version in generated binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Molina <[email protected]>
  • Loading branch information
erizocosmico committed Apr 4, 2019
1 parent ca3ad0d commit 4348b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Package configuration
PROJECT = gitbase
COMMANDS = cmd/gitbase
GO_BUILD_ARGS += -tags mysql_go_regex

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

-include $(MAKEFILE)

GO_BUILD_ARGS += -tags mysql_go_regex

upgrade:
go run tools/rev-upgrade/main.go -p $(UPGRADE_PRJ) -r $(UPGRADE_REV)

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

ci-e2e: packages
go test ./e2e -gitbase-version="$(TRAVIS_TAG)" \
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestMain(m *testing.M) {

path, err := exec.LookPath(*bin)
if err != nil {
fmt.Println("gitbase-bin not provided")
fmt.Println("gitbase-bin not provided:", err)
if *mustRun {
os.Exit(1)
} else {
Expand Down

0 comments on commit 4348b95

Please sign in to comment.