aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-05-31 01:53:01 -0300
committerdequis <dx@dxzone.com.ar>2015-05-31 01:53:01 -0300
commite28c449dcf54c6ed3e5651b1f981e70f3d24cbf9 (patch)
tree5a4f8f21cedf7ccaff9b9915817acf49e34bdbaa
parent2ca933c271083fb9fee955263c0535b6fda43b22 (diff)
configure: handle 'git describe' failures when no tags are reachable
Just make up some fake describe output based on the real version
-rwxr-xr-xconfigure9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure b/configure
index f6e8b07e..98f1eca4 100755
--- a/configure
+++ b/configure
@@ -81,9 +81,14 @@ get_version() {
search="(.+)-([0-9]+)-(g[0-9a-f]+)"
replace="\1+$timestamp+$branch+\2-\3-git"
- BITLBEE_VERSION=$(cd $srcdir; git describe --long --tags | sed -r "s#$search#$replace#")
+ describe=$(cd $srcdir; git describe --long --tags 2>/dev/null)
+ if [ $? -ne 0 ]; then
+ describe=${REAL_BITLBEE_VERSION}-0-g$(cd $srcdir; git rev-parse --short HEAD)
+ fi
+
+ BITLBEE_VERSION=$(echo $describe | sed -r "s#$search#$replace#")
- unset timestamp branch search replace
+ unset timestamp branch search replace describe
fi
}