Permalink
Browse files

Fix #275, close #297

  • Loading branch information...
1 parent 3a7dc7a commit 10b489082776fd48b26e317bdee4eb2ecb4d2a18 @DarthGandalf DarthGandalf committed Apr 1, 2013
Showing with 13 additions and 3 deletions.
  1. +13 −3 version.sh
View
@@ -16,11 +16,21 @@ else
COMMITS_SINCE=`${GIT} log --format=oneline ${LATEST_TAG}..HEAD | wc -l`
SHORT_ID=`${GIT} rev-parse --short HEAD`
- # If this commit is tagged, don't print anything
- # (the assumption here is: this is a release)
if [ "x$COMMITS_SINCE" = "x0" ]
then
- EXTRA=""
+ if [ "x$LATEST_TAG" = "x" ]
+ then
+ if [ "x$SHORT_ID" = "x" ]
+ then
+ EXTRA=""
+ else
+ EXTRA="-git-${SHORT_ID}"
+ fi
+ else
+ # If this commit is tagged, don't print anything
+ # (the assumption here is: this is a release)
+ EXTRA=""
+ fi
else
EXTRA="-git-${COMMITS_SINCE}-${SHORT_ID}"
fi

0 comments on commit 10b4890

Please sign in to comment.