From c072558b90f1bbedc2022b0f30c8b1ac4712538e Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Fri, 18 Feb 2011 09:50:58 +0100 Subject: Imported Upstream version 2011.02.15 --- src/version.bash | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/version.bash') diff --git a/src/version.bash b/src/version.bash index 2d29825ff..0e6483150 100755 --- a/src/version.bash +++ b/src/version.bash @@ -11,17 +11,16 @@ fi # Get numerical revision VERSION=$(hg identify -n 2>/dev/null) -if [ $? = 0 ]; then - TAG=$(hg identify -t | sed 's!/release!!') -else +if [ $? != 0 ]; then OLD=$(hg identify | sed 1q) VERSION=$(echo $OLD | awk '{print $1}') - TAG=$(echo $OLD | awk '{print $2}' | sed 's!/release!!') fi -# Append tag if not 'tip' -if [[ "$TAG" != "tip" ]]; then - VERSION="$VERSION $TAG" +# Find most recent known release tag. +TAG=$(hg tags | awk '$1~/^release\./ {print $1}' | sed -n 1p) + +if [ "$TAG" != "" ]; then + VERSION="$TAG $VERSION" fi echo $VERSION -- cgit v1.2.3