]> code.citadel.org Git - citadel.git/commitdiff
Modified mk_svn_revision.sh so that it doesn't barf when git is in
authorArt Cancro <ajc@citadel.org>
Tue, 31 Aug 2010 22:11:27 +0000 (18:11 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 31 Aug 2010 22:11:27 +0000 (18:11 -0400)
use.  Someone already tried to handle this situation but it was
b0rken.  Fixed.

citadel/scripts/mk_svn_revision.sh

index 4fdfb9c836a57e1e8b0a4d1b9e897ccf6619202f..8173fff3045c3c01defed5e83cdbc1c5c290f176 100755 (executable)
@@ -24,11 +24,9 @@ if test -d $SRC_DIR/.svn  ; then
                CAN_BUILD_SVN_REVISION="yes"
        fi
 else 
-    if git status/dev/null 2>&1; then 
+    if git status >/dev/null 2>&1; then 
        echo "have Git repository."
-       TAG=`git rev-parse HEAD`
-       BRANCH="`git show-branch |head -n1 |sed 's;.*\[\(.*\)\].*;\1;'`"
-       BUILD="GIT: $BRANCH : $TAG"
+       BUILD=`/usr/bin/git log -1 --pretty=%H . `
        echo "This code base git-revision: $BUILD"
        CAN_BUILD_SVN_REVISION="yes"
     else