Commit 468295aa authored by Richard Gobeille's avatar Richard Gobeille
Browse files

Update the revision numbers added to builds to also contain the commit's short hash

parent cad905dd
......@@ -1031,17 +1031,16 @@ LIBS += -lm
##### Detect version control revision, if applicable
VC_REV :=
VC_HASH :=
-include EDUKE32_REVISION.mak
ifeq (,$(VC_REV))
VC_REV := $(word 2,$(subst :, ,$(filter Revision:%,$(subst : ,:,$(strip $(shell svn info 2>&1))))))
VC_REV := $(shell git rev-list --count origin 2>&1)
endif
ifeq (,$(VC_REV))
GIT_SVN_URL := $(strip $(shell git config --local svn-remote.svn.url))
GIT_SVN_FETCH := $(strip $(shell git config --local svn-remote.svn.fetch))
VC_REV := $(word 2,$(subst @, ,$(filter git-svn-id:$(GIT_SVN_URL)@%,$(subst : ,:,$(shell git log -1 $(GIT_SVN_FETCH::%=%))))))
ifeq (,$(VC_HASH))
VC_HASH := $(shell git rev-parse --short origin 2>&1)
endif
ifneq (,$(VC_REV)$(VC_REV_CUSTOM))
REVFLAG := -DREV="r$(VC_REV)$(VC_REV_CUSTOM)"
ifneq (,$(VC_REV)$(VC_HASH)$(VC_REV_CUSTOM))
REVFLAG := -DREV="r$(VC_REV)-$(VC_HASH)$(VC_REV_CUSTOM)"
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment