diff options
author | dequis <dx@dxzone.com.ar> | 2015-05-31 01:53:01 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-05-31 01:53:01 -0300 |
commit | e28c449dcf54c6ed3e5651b1f981e70f3d24cbf9 (patch) | |
tree | 5a4f8f21cedf7ccaff9b9915817acf49e34bdbaa | |
parent | 2ca933c271083fb9fee955263c0535b6fda43b22 (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-x | configure | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 } |