diff --git a/Makefile b/Makefile index 18989f7..4d29ff9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ BIN := mmv VERSION := $$(make -s show-version) VERSION_PATH := cmd/$(BIN) -BUILD_LDFLAGS := "-s -w" +CURRENT_REVISION := $(shell git rev-parse --short HEAD) +BUILD_LDFLAGS := "-s -w -X main.revision=$(CURRENT_REVISION)" GOBIN ?= $(shell go env GOPATH)/bin export GO111MODULE=on