From e28c449dcf54c6ed3e5651b1f981e70f3d24cbf9 Mon Sep 17 00:00:00 2001 From: dequis Date: Sun, 31 May 2015 01:53:01 -0300 Subject: configure: handle 'git describe' failures when no tags are reachable Just make up some fake describe output based on the real version --- configure | 9 +++++++-- 1 file 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 } -- cgit v1.2.3