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