From e53a9f83f4ea40b8a4540707f4f0ef47702aad8c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 15 Oct 2015 10:47:05 -0400 Subject: [PATCH] Change to versioning derivation from git data Rather than manually curate the VERSION, use git tags and auto-create intermediate builds with unique identifiers. Identify both number of commits to indicate order and the git short rev to see which rev matches. --- confluent_client/VERSION | 1 - confluent_server/VERSION | 1 - confluent_server/makesetup | 7 ++++++- 3 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 confluent_client/VERSION delete mode 100644 confluent_server/VERSION diff --git a/confluent_client/VERSION b/confluent_client/VERSION deleted file mode 100644 index 5625e59d..00000000 --- a/confluent_client/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.2 diff --git a/confluent_server/VERSION b/confluent_server/VERSION deleted file mode 100644 index 5625e59d..00000000 --- a/confluent_server/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.2 diff --git a/confluent_server/makesetup b/confluent_server/makesetup index 490da3b7..645fd2bf 100755 --- a/confluent_server/makesetup +++ b/confluent_server/makesetup @@ -1,3 +1,8 @@ cd `dirname $0` -VERSION=`cat VERSION` +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` +fi +echo $VERSION > VERSION sed -e "s/#VERSION#/$VERSION/" setup.py.tmpl > setup.py