if test -x $SVNVERSION ; then
echo "have svnversion at $SVNVERSION"
BUILD=`svnversion -n .`
- echo "This code base revision $BUILD"
+ echo "This code base svn-revision: $BUILD"
CAN_BUILD_SVN_REVISION="yes"
fi
+else
+ if git status> /dev/null 2>&1; then
+ echo "have Git repository."
+ TAG=`git rev-parse HEAD`
+ BRANCH="`git show-branch |sed 's;\[\(.*\)\].*;\1;'`"
+ BUILD="GIT: $BRANCH : $TAG"
+ echo "This code base git-revision: $BUILD"
+ CAN_BUILD_SVN_REVISION="yes"
+ fi
fi
if [ "$CAN_BUILD_SVN_REVISION" = "yes" ] ; then
cat <<EOF > $C_FILE
/*
- * Subversion revision functions
+ * Subversion / GIT revision functions
*
* Autogenerated at make/release time
*
cat <<EOF > $C_FILE
/*
- * Subversion revision functions
+ * Subversion / GIT revision functions
*
* Autogenerated at make time
*