Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
only add branch to version string if not in master
  • Loading branch information
OlegHahm committed Nov 27, 2013
1 parent 529f3fb commit e9b04cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile.base
Expand Up @@ -10,8 +10,12 @@ OBJ = $(SRC:%.c=$(BINDIR)%.o)
DEP = $(SRC:%.c=$(BINDIR)%.d)

GIT_STRING := $(shell git describe --abbrev=4 --dirty=-`hostname`)
GIT_STRING += $(shell git rev-parse --abbrev-ref HEAD)
GIT_VERSION = $(shell echo $(GIT_STRING) | sed 's/ /-/')
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ifeq ($(strip $(GIT_BRANCH)),master)
GIT_VERSION = $(GIT_STRING)
else
GIT_VERSION = $(shell echo $(GIT_STRING) $(GIT_BRANCH) | sed 's/ /-/')
endif
ifeq ($(strip $(GIT_VERSION)),)
GIT_VERSION := "UNKNOWN"
endif
Expand Down

0 comments on commit e9b04cc

Please sign in to comment.