From bb38ff4588c12e938c80e94fb1d6161af4ce5a92 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 30 Sep 2016 13:12:40 -0400 Subject: [PATCH] Fix auto-version build The build autoversion was not correct. Use git describe instead to be more complete. --- confluent_server/makesetup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/confluent_server/makesetup b/confluent_server/makesetup index 645fd2bf..2ee30143 100755 --- a/confluent_server/makesetup +++ b/confluent_server/makesetup @@ -1,8 +1,8 @@ cd `dirname $0` -VERSION=`git tag -l|tail -n 1` -NUMCOMMITS=`git rev-list $VERSION..HEAD|wc -l` -if [ "$NUMCOMMITS" -ne 0 ]; then - VERSION=$VERSION.dev$NUMCOMMITS.g`git rev-parse --short HEAD` +VERSION=`git describe|cut -d- -f 1` +NUMCOMMITS=`git describe|cut -d- -f 2` +if [ "$NUMCOMMITS" != "$VERSION" ]; then + VERSION=$VERSION.dev$NUMCOMMITS.g`git describe|cut -d- -f 3` fi echo $VERSION > VERSION sed -e "s/#VERSION#/$VERSION/" setup.py.tmpl > setup.py