From cb67c8328751736ff3e234305a64aad537d7ba3e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 4 Sep 2024 08:11:42 -0400 Subject: [PATCH] iAttempt to be consistent with ~ prerelease versioning We may not know where we are going, but at least bump the minor number. Ultimately we may not be building toward that number, or that number will be used in a different branch, but it can at least handle more cases --- confluent_server/makesetup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_server/makesetup b/confluent_server/makesetup index de39ea18..012fe1d4 100755 --- a/confluent_server/makesetup +++ b/confluent_server/makesetup @@ -2,7 +2,11 @@ cd `dirname $0` 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` + LASTNUM=$(echo $VERSION|rev|cut -d . -f 1|rev) + LASTNUM=$((LASTNUM+1)) + FIRSTPART=$(echo $VERSION|rev|cut -d . -f 2- |rev) + VERSION=${FIRSTPART}.${LASTNUM} + 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