Feat: Branch cut stable/chlorine stream
[releng/builder.git] / jjb / autorelease / generate-release-notes.sh
index 46efa078f2b52513a4d5a387cb9f8204a9f6ac07..9aa5907328917b76a0b40f6bd15a3a6d94238fe6 100644 (file)
 
 set -x
 
-pip install --user --quiet --upgrade git-review
+# shellcheck disable=SC1090
+. ~/lf-env.sh
+
+lf-activate-venv --python python3 "git-review==2.3.1"
 
 RELEASE=${RELEASE:-$(echo "$GERRIT_EVENT_COMMENT_TEXT" | base64 -d | grep generate-release-notes | awk '{print $2}')}
 if [ -z "$RELEASE" ]; then
@@ -54,6 +57,9 @@ fi
 git status
 git remote add gerrit "ssh://jenkins-$SILO@git.opendaylight.org:29418/docs.git"
 
+# Workaround for git-review failing to copy the commit-msg hook to submodules
+git config core.hooksPath "$(git rev-parse --show-toplevel)/.git/hooks"
+
 # Don't fail the build if this command fails because it's possible that there
 # is no changes since last update.
-git review --yes -t "$GERRIT_TOPIC" || true
+git review --yes -t "$GERRIT_TOPIC" "$GERRIT_BRANCH" || true