]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
switch version tracking to git
authorRudolf Polzer <rpolzer@grawp.(none)>
Fri, 2 Apr 2010 13:18:27 +0000 (15:18 +0200)
committerRudolf Polzer <rpolzer@grawp.(none)>
Fri, 2 Apr 2010 13:18:27 +0000 (15:18 +0200)
Makefile

index f3778e4ce1acc6e5e770e49c4f5ede92725ac9c6..25827897f6971b16b1f8c2189393fd8c371f9ec0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ DIFF               ?= diff
 SED                ?= sed
 
 # optional:
-SVNVERSION         ?= svnversion
+GIT                ?= git
 
 STDOUT_TO_DEVNULL  ?= >/dev/null
 STDERR_TO_DEVNULL  ?= 2>/dev/null
@@ -221,10 +221,10 @@ Q3MAP_VERSION = 2.5.17n
 # Executable extension
 RADIANT_EXECUTABLE := $(EXE)
 
-SVN_VERSION := $(shell $(SVNVERSION) -n $(STDERR_TO_DEVNULL) | $(SED) 's/M$$//g; s/.*://g;')
-ifneq ($(SVN_VERSION),)
-       RADIANT_VERSION := $(RADIANT_VERSION)-svn$(SVN_VERSION)
-       Q3MAP_VERSION := $(Q3MAP_VERSION)-svn$(SVN_VERSION)
+GIT_VERSION := $(shell $(GIT) rev-parse --short HEAD $(STDERR_TO_DEVNULL))
+ifneq ($(GIT_VERSION),)
+       RADIANT_VERSION := $(RADIANT_VERSION)-git-$(GIT_VERSION)
+       Q3MAP_VERSION := $(Q3MAP_VERSION)-git-$(GIT_VERSION)
 endif
 
 CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\"" -DRADIANT_EXECUTABLE="\"$(RADIANT_EXECUTABLE)\""