]> code.citadel.org Git - citadel.git/commitdiff
* simplify more complex output of 'git branch' so we can deal with it.
authorWilfried Göesgens <willi@citadel.org>
Sun, 15 Aug 2010 21:18:26 +0000 (21:18 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 15 Aug 2010 21:18:26 +0000 (21:18 +0000)
citadel/scripts/mk_svn_revision.sh

index 2c5e1e26e6572b06688b699e3c7911c3c45a6954..4fdfb9c836a57e1e8b0a4d1b9e897ccf6619202f 100755 (executable)
@@ -27,7 +27,7 @@ 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;'`"
+       BRANCH="`git show-branch |head -n1 |sed 's;.*\[\(.*\)\].*;\1;'`"
        BUILD="GIT: $BRANCH : $TAG"
        echo "This code base git-revision: $BUILD"
        CAN_BUILD_SVN_REVISION="yes"