Skip to content

Commit

Permalink
Added version to make install
Browse files Browse the repository at this point in the history
When using make install, lab would install with version `master`, with
the current change, the version is the same as the one shown on build.

Signed-off-by: Lucas Zampieri <[email protected]>
  • Loading branch information
zampierilucas committed Jun 24, 2021
1 parent 86581e4 commit b5b084c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ VERSION ?= $(shell git describe --long --tags)
GOURL ?= github.com/zaquestion/lab

build:
GO111MODULE=on go build -ldflags "-X \"main.version=$(VERSION)\"" $(GOURL)
GO111MODULE=on go build -ldflags "-X 'main.version=$(VERSION)'" $(GOURL)

install: build
GO111MODULE=on go install $(GOURL)
GO111MODULE=on go install -ldflags "-X 'main.version=$(VERSION)'" $(GOURL)

test:
bash -c "trap 'trap - SIGINT SIGTERM ERR; mv testdata/.git testdata/test.git; rm coverage-* 2>&1 > /dev/null; exit 1' SIGINT SIGTERM ERR; $(MAKE) internal-test"
Expand Down

0 comments on commit b5b084c

Please sign in to comment.