summaryrefslogtreecommitdiff
path: root/findversion.sh
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-05-07 15:13:52 +0000
committermichi_cc <michi_cc@openttd.org>2011-05-07 15:13:52 +0000
commit28067c21d5cc155f72c85374f8463bf8ceb1f0a0 (patch)
tree760377805d9c30946a9b54905508801790b56478 /findversion.sh
parent6cbc7be92bd90e80baf9cd4715319cf4ac7dfe7d (diff)
downloadopenttd-28067c21d5cc155f72c85374f8463bf8ceb1f0a0.tar.xz
(svn r22435) -Fix: Git revision detection would return too much when tags are involved.
Diffstat (limited to 'findversion.sh')
-rwxr-xr-xfindversion.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/findversion.sh b/findversion.sh
index e83a6c0bf..35568de0c 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -99,7 +99,7 @@ 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`"
+ TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@'`"
if [ -n "$TAG" ]; then
BRANCH=""
REV="$TAG"