summaryrefslogtreecommitdiff
path: root/findversion.sh
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-01-18 21:27:30 +0000
committermichi_cc <michi_cc@openttd.org>2011-01-18 21:27:30 +0000
commit73da045f50ac7aa67ad9330e4671f1d49c6c340c (patch)
tree77c2f1c6eb638032869562e83f5ea43231e89cc3 /findversion.sh
parent561449992a943fe796ac1d0cb4f4126c108a266c (diff)
downloadopenttd-73da045f50ac7aa67ad9330e4671f1d49c6c340c.tar.xz
(svn r21839) -Change: Support tags created by git-svn for the revision detection.
Diffstat (limited to 'findversion.sh')
-rwxr-xr-xfindversion.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/findversion.sh b/findversion.sh
index 89fc44b3c..94e48413e 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -99,6 +99,11 @@ elif [ -d "$ROOT_DIR/.git" ]; then
# No rev? Maybe it is a custom git-svn clone
REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"`
fi
+ TAG=`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null`
+ if [ -n "$TAG" ]; then
+ BRANCH=""
+ REV=$TAG
+ fi
elif [ -d "$ROOT_DIR/.hg" ]; then
# We are a hg checkout
if [ -n "`hg status | grep -v '^?'`" ]; then