From 3bab6f36d69892d56b1de56930125ffb3ea3e6e4 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 6 Feb 2018 22:40:34 +0100 Subject: [PATCH] Add git branch name to tgz and zip name if not master --- src/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile b/src/Makefile index ca94b82a..7e09e327 100644 --- a/src/Makefile +++ b/src/Makefile @@ -35,6 +35,10 @@ # Detect GIT revision GIT_REVISION = $(shell git rev-list --count 1af8c74f53110e349d8f0d19b14599281913f71f..) + GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD) + ifneq (master,$(GIT_BRANCH)) + GIT_REVISION := "$(GIT_REVISION)-$(GIT_BRANCH)" + endif REVISION_CACHE = .revision.cache RES := $(shell if [ ! -f $(REVISION_CACHE) ] || [ "`cat $(REVISION_CACHE)`" != "$(GIT_REVISION)" ] ; then echo "$(GIT_REVISION)" > $(REVISION_CACHE) ; fi )