Implementing dirty git checkout indicator
This commit is contained in:
parent
e566b89a5f
commit
5471f5b2ee
1 changed files with 4 additions and 1 deletions
5
Makefile
5
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue