Fix commit msg to version correctly on bump 54/92054/1
authorThanh Ha <zxiiro@gmail.com>
Tue, 11 Aug 2020 18:28:32 +0000 (14:28 -0400)
committerThanh Ha <zxiiro@gmail.com>
Tue, 11 Aug 2020 18:28:32 +0000 (14:28 -0400)
When version bump when branch cutting we want to bump by x.(y+1).z
and when performing a release bump we want to bump by x.y.(z+1)
however the current code always sets the message to "Bump version by
x.y.(z+1)" regardless of what kind of bump it was.

Change-Id: Ic88946b61f9381792c5c61190530d5d8b35e03ee
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
jjb/autorelease/version-bump.sh

index cbd532e5936f7a3538d2e77429c1601b46ff82a4..12e1b849b3c50c378e53802cad12b3e9ea9d91b2 100644 (file)
@@ -56,6 +56,9 @@ git status
 
 if [ "$BRANCH_CUT" = "false" ]; then
     lftools version release "$RELEASE_TAG"
+    commit_msg="Bump versions by x.y.(z+1)"
+else
+    commit_msg="Bump versions by x.(y+1).z"
 fi
 lftools version bump "$RELEASE_TAG"
 
@@ -64,7 +67,7 @@ pushd integration/distribution || true
     git checkout -f opendaylight/pom.xml || true
 popd || true
 
-git submodule foreach "git commit -asm 'Bump versions by x.y.(z+1)'"
+git submodule foreach "git commit -asm '${commit_msg}'"
 # Only submodules need to be bumped, we can ignore autorelease's bump information
 git checkout -f