X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fversion-bump.sh;h=377888355e426d909ebb3f7222b2540e5fb30971;hb=936ba45c2e3ec10b8df922c707627c504417b9d3;hp=12e1b849b3c50c378e53802cad12b3e9ea9d91b2;hpb=6bfc1211fbafcae3ec17466f94474ac726235bd2;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/version-bump.sh b/jjb/autorelease/version-bump.sh index 12e1b849b..377888355 100644 --- a/jjb/autorelease/version-bump.sh +++ b/jjb/autorelease/version-bump.sh @@ -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 --python python3 "git-review==2.3.1" # Fail if branch cutting is not on master if [ "$BRANCH_CUT" = "true" ] && [ "$BRANCH" != "master" ]; then @@ -45,6 +48,9 @@ if [ "$BRANCH_CUT" = "false" ]; then done fi +# Workaround for git-review failing to copy the commit-msg hook to submodules +git config core.hooksPath "$(git rev-parse --show-toplevel)/.git/hooks" + # Setup Gerrit remote to ensure Change-Id gets set on commit. git config --global --add gitreview.username "jenkins-$SILO" git review -s @@ -59,6 +65,8 @@ if [ "$BRANCH_CUT" = "false" ]; then 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"