Skip to content

Commit 5f1297c

Browse files
committed
remove CURRENT_REVISION, replace read VERSION from git.
1 parent 9cd4986 commit 5f1297c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
VERSION = 0.48.0
2-
CURRENT_REVISION = $(shell git rev-parse --short HEAD)
1+
# This VERSION variable indicates the latest tag.
2+
VERSION = $(subst v,,$(shell git describe --abbrev=0 --tags))
33
ifeq ($(OS),Windows_NT)
44
GOPATH_ROOT:=$(shell cygpath ${GOPATH})
55
else
@@ -40,7 +40,7 @@ build:
4040
# We need to force rebuild "mackerel-check" if GOOS or GOARCH are passed.
4141
build/mackerel-check: $(patsubst %,depends_on,$(GOOS)$(GOARCH))
4242
mkdir -p build
43-
CGO_ENABLED=0 go build -ldflags="-s -w -X main.gitcommit=$(CURRENT_REVISION)" \
43+
CGO_ENABLED=0 go build -ldflags="-s -w" \
4444
-o build/mackerel-check
4545

4646
.PHONY: depends_on

0 commit comments

Comments
 (0)