Permalink
Browse files

get-version fuer Git-Tags gefixt

  • Loading branch information...
philipp-kempgen committed Jun 18, 2010
1 parent bcf64fc commit 406dc8a6f6c76bdbf087161c678ae153393d64a0
Showing with 10 additions and 1 deletion.
  1. +10 −1 get-version
View
@@ -113,7 +113,16 @@ then
elif [ -d .git ]
then
# //FIXME!
- BRANCH=`git branch --no-color | grep '^ *[*] ' | grep -o -Ee '[a-zA-Z0-9\\-_]+' | head -n 1`
+
+ if git branch --no-color | grep -i 'no branch' 1>>/dev/null 2>>/dev/null
+ then
+ # might be a tag
+ GIT_DESCR=`git describe --all --always`
+ echo "${GIT_DESCR}"
+ exit 0
+ fi
+
+ BRANCH=`git branch --no-color | grep '^ *[*] ' | grep -o -Ee '[a-zA-Z0-9\\-_.]+' | head -n 1`
if [ -z ${BRANCH} ]; then
BRANCH=unknown
fi

0 comments on commit 406dc8a

Please sign in to comment.