Fix CONTIKI_VERSION_STRING

Currently, the version string always ends with -dirty. This is related to the logic behind --git-dir, which assumes that the current working dir is the top-level dir of the repo, unless --work-tree is also specified
This commit is contained in:
George Oikonomou 2018-04-01 16:15:02 +01:00
parent 941d8457b4
commit 5d1ed3c17f
1 changed files with 2 additions and 1 deletions

View File

@ -263,7 +263,8 @@ CFLAGS += ${addprefix -I,$(SOURCEDIRS) $(CONTIKI)}
### Check for a git repo and pass version if found
### git.exe in Windows cmd shells may require no stderr redirection
ifndef RELSTR
RELSTR:=${shell git --git-dir ${CONTIKI}/.git describe --tags --always --dirty}
RELSTR:=${shell git --git-dir ${CONTIKI}/.git --work-tree ${CONTIKI} describe \
--tags --always --dirty}
endif
ifneq ($(RELSTR),)