auto-extract repo revs from svn or git as needed - closes issue #5

This commit is contained in:
Michael Iedema
2014-06-20 19:52:19 +02:00
parent 77686c8e49
commit 5463a9c618
3 changed files with 15 additions and 4 deletions

View File

@@ -27,7 +27,7 @@
#define FEATURES "+GPRS " #define FEATURES "+GPRS "
const char *gVersionString = "release " VERSION FEATURES PROD_CAT " built " TIMESTAMP_ISO " rev" SVN_REV " "; const char *gVersionString = "release " VERSION FEATURES PROD_CAT " built " TIMESTAMP_ISO " " REPO_REV " ";
const char* gOpenBTSWelcome = const char* gOpenBTSWelcome =
//23456789123456789223456789323456789423456789523456789623456789723456789 //23456789123456789223456789323456789423456789523456789623456789723456789
@@ -35,7 +35,7 @@ const char* gOpenBTSWelcome =
"Copyright 2008, 2009, 2010 Free Software Foundation, Inc.\n" "Copyright 2008, 2009, 2010 Free Software Foundation, Inc.\n"
"Copyright 2010 Kestrel Signal Processing, Inc.\n" "Copyright 2010 Kestrel Signal Processing, Inc.\n"
"Copyright 2011, 2012, 2013, 2014 Range Networks, Inc.\n" "Copyright 2011, 2012, 2013, 2014 Range Networks, Inc.\n"
"Release " VERSION " " PROD_CAT " formal build date " TIMESTAMP_ISO " rev" SVN_REV "\n" "Release " VERSION " " PROD_CAT " formal build date " TIMESTAMP_ISO " " REPO_REV "\n"
"\"OpenBTS\" is a registered trademark of Range Networks, Inc.\n" "\"OpenBTS\" is a registered trademark of Range Networks, Inc.\n"
"\nContributors:\n" "\nContributors:\n"
" Range Networks, Inc.:\n" " Range Networks, Inc.:\n"

11
Globals/GrabRepoInfo.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
cd $1
INFO=""
if [ -d ./.svn ]; then
INFO="r$(svn info . | grep "Last Changed Rev:" | cut -d " " -f 4) CommonLibs:r$(svn info ./CommonLibs | grep "Last Changed Rev:" | cut -d " " -f 4)"
elif [ -d ./.git ]; then
INFO="$(git rev-parse --short=10 HEAD) CommonLibs:$(cd CommonLibs; git rev-parse --short=10 HEAD)"
fi
echo $INFO

View File

@@ -41,10 +41,10 @@ NODEMANAGER_INCLUDEDIR = $(top_srcdir)/NodeManager
JSONBOX_INCLUDEDIR = $(top_srcdir)/NodeManager/JsonBox-0.4.3/include JSONBOX_INCLUDEDIR = $(top_srcdir)/NodeManager/JsonBox-0.4.3/include
SCANNING_INCLUDEDIR = $(top_srcdir)/Scanning SCANNING_INCLUDEDIR = $(top_srcdir)/Scanning
SVNDEV = -D'SVN_REV="$(shell svn info $(top_builddir) | grep "Last Changed Rev:" | cut -d " " -f 4) CommonLibs:rev$(shell svn info $(top_builddir)/CommonLibs | grep "Last Changed Rev:" | cut -d " " -f 4)"' REPOREV = -D'REPO_REV="$(shell ./$(top_builddir)/Globals/GrabRepoInfo.sh $(top_builddir))"'
STD_DEFINES_AND_INCLUDES = \ STD_DEFINES_AND_INCLUDES = \
$(SVNDEV) \ $(REPOREV) \
-I$(COMMON_INCLUDEDIR) \ -I$(COMMON_INCLUDEDIR) \
-I$(CONTROL_INCLUDEDIR) \ -I$(CONTROL_INCLUDEDIR) \
-I$(GSM_INCLUDEDIR) \ -I$(GSM_INCLUDEDIR) \