From c4cf871ccf113f2510cca6f1922c62bf004b3c7d Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Sun, 29 Apr 2018 12:26:49 -0700 Subject: [PATCH] Display build branch in version --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9fa09291..eb7659d2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +BRANCH := `git rev-parse --abbrev-ref HEAD` + install: which wtf | xargs rm - go install -ldflags="-X main.version=$(shell git describe --always --abbrev=6 --dirty=-dev) -X main.builtat=$(shell date +%FT%T%z)" + go install -ldflags="-X main.version=$(shell git describe --always --abbrev=6)_$(BRANCH) -X main.builtat=$(shell date +%FT%T%z)"