diff options
-rw-r--r-- | Makefile.common | 15 | ||||
-rw-r--r-- | backends/platform/dc/dreamcast.mk | 4 | ||||
-rw-r--r-- | base/internal_version.h | 2 |
3 files changed, 11 insertions, 10 deletions
diff --git a/Makefile.common b/Makefile.common index 1cb2936efe..9b5a327f72 100644 --- a/Makefile.common +++ b/Makefile.common @@ -163,17 +163,17 @@ VER_EXTRA = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c2-) ###################################################################### -# Get Subversion's working copy information +# Get git's working copy information ###################################################################### -ifneq ($(shell svn info $(srcdir) 1>/dev/null 2>&1 || echo "error"),error) -SVNROOT := $(srcdir) +ifneq ($(shell cd $(srcdir); git rev-parse --verify HEAD 1>/dev/null 2>&1 || echo "error"),error) +GITROOT := $(srcdir) ifeq ($(origin VER_REV), undefined) # Get the working copy base revision -VER_REV := $(shell LANG=C svn info $(SVNROOT) | grep "^Revision" | cut -d ' ' -f 2) +VER_REV := $(shell cd $(srcdir); git describe --match desc/\* --dirty | cut -d '-' -f 2-) endif else -SVNROOT := https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/ +GITROOT := git://github.com/scummvm/scummvm.git endif # Define the Subversion revision if available, either autodetected or @@ -186,11 +186,11 @@ endif # Distribution settings ###################################################################### -ifeq ($(VER_EXTRA),svn) +ifeq ($(VER_EXTRA),git) ifeq ($(origin VER_REV), undefined) DISTVERSION = $(shell date '+%Y-%m-%d') else -DISTVERSION = svn$(VER_REV) +DISTVERSION = git$(VER_REV) endif else DISTVERSION = $(VERSION) @@ -200,6 +200,7 @@ DISTNAME := scummvm-$(DISTVERSION) DISTDIR := dist VERFILE := $(DISTDIR)/$(DISTNAME)/base/internal_version.h +# TODO git via $(GITROOT) $(VERFILE): $(srcdir)/base/internal_version.h @$(RM_REC) $(DISTDIR) @$(MKDIR) $(DISTDIR) diff --git a/backends/platform/dc/dreamcast.mk b/backends/platform/dc/dreamcast.mk index 5da966cf30..d53af90585 100644 --- a/backends/platform/dc/dreamcast.mk +++ b/backends/platform/dc/dreamcast.mk @@ -28,8 +28,8 @@ IP.BIN : ip.txt makeip $< $@ ip.txt : $(srcdir)/backends/platform/dc/ip.txt.in - if [ x"$(VER_EXTRA)" = xsvn ]; then \ - if [ -z "$(VER_REV)" ]; then ver="SVN"; else ver="r$(VER_REV)"; fi; \ + if [ x"$(VER_EXTRA)" = xgit ]; then \ + if [ -z "$(VER_REV)" ]; then ver="GIT"; else ver="r$(VER_REV)"; fi; \ else ver="V$(VERSION)"; fi; \ if expr "$$ver" : V...... >/dev/null; then \ ver="V$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)"; fi; \ diff --git a/base/internal_version.h b/base/internal_version.h index 55903d24bc..fc7b5350f5 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -10,4 +10,4 @@ #define SCUMMVM_REVISION #endif -#define SCUMMVM_VERSION "1.3.0svn" SCUMMVM_REVISION +#define SCUMMVM_VERSION "1.3.0git" SCUMMVM_REVISION |