2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Fix auto-version build

The build autoversion was not correct.  Use
git describe instead to be more complete.
This commit is contained in:
Jarrod Johnson 2016-09-30 13:12:40 -04:00
parent d4ffc41451
commit bb38ff4588

View File

@ -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