From b09ac820626c4ee5edaefa507fd387be06673b43 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 1 Jul 2017 18:56:33 +0200 Subject: [PATCH] Update release script to take bug fix releases into account --- do-release.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/do-release.sh b/do-release.sh index 60acc95b32..663005fe9b 100755 --- a/do-release.sh +++ b/do-release.sh @@ -29,8 +29,15 @@ RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT} MAJOR=$(echo $RELEASE_VERSION | cut -d . -f 1) MINOR=$(echo $RELEASE_VERSION | cut -d . -f 2) PATCH=$(echo $RELEASE_VERSION | cut -d . -f 3) -NEXT_MINOR=$(expr ${MINOR} + 1) -DEVELOPMENT_VERSION="$MAJOR.$NEXT_MINOR.0" +if [ "$PATCH" == "0" ]; then + NEXT_MINOR=$(expr ${MINOR} + 1) + NEXT_PATCH="0" +else + # this is a bugfixing release + NEXT_MINOR="${MINOR}" + NEXT_PATCH=$(expr ${PATCH} + 1) +fi +DEVELOPMENT_VERSION="$MAJOR.$NEXT_MINOR.$NEXT_PATCH" DEVELOPMENT_VERSION="${DEVELOPMENT_VERSION}-SNAPSHOT" # http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch