Fix: sourced files w/o arg bashisms
[releng/builder.git] / jjb / autorelease / version-bump.sh
index cbd532e5936f7a3538d2e77429c1601b46ff82a4..a95f9b32f592843547bc4ed991e6f9e9c96a0908 100644 (file)
@@ -26,7 +26,10 @@ BRANCH="$GERRIT_BRANCH"
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
 
-pip install --user --quiet --upgrade git-review
+# shellcheck disable=SC1090
+. ~/lf-env.sh
+
+lf-activate-venv "git-review==1.28"
 
 # Fail if branch cutting is not on master
 if [ "$BRANCH_CUT" = "true" ] && [ "$BRANCH" != "master" ]; then
@@ -56,6 +59,11 @@ 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"
+    # If we are branch cutting we also need to bump the docs/conf.yaml version
+    find . -type f -name conf.yaml -exec sed -i "s/version:.*/version: ${STREAM^}/" {} \;
 fi
 lftools version bump "$RELEASE_TAG"
 
@@ -64,7 +72,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