From 5471f5b2ee4bd637147a1ea1dce716670b50796d Mon Sep 17 00:00:00 2001 From: Shawn Siefkas Date: Tue, 2 Apr 2013 09:38:08 -0500 Subject: [PATCH] Implementing dirty git checkout indicator --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2eacedf61..06c85e788 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