diff --git a/Makefile b/Makefile index 2eacedf61d..06c85e7888 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,10 @@ ifeq ($(VERBOSE), 1) GO_OPTIONS += -v endif -BUILD_OPTIONS = -ldflags "-X main.GIT_COMMIT `git rev-parse --short HEAD`" +GIT_COMMIT = $(shell git rev-parse --short HEAD) +GIT_STATUS = $(shell test -n "`git status --porcelain`" && echo "+CHANGES") + +BUILD_OPTIONS = -ldflags "-X main.GIT_COMMIT $(GIT_COMMIT)$(GIT_STATUS)" SRC_DIR := $(GOPATH)/src