Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / shell / gerrit-push-patch.sh
index ab9d57b..09453f4 100644 (file)
@@ -47,7 +47,7 @@ echo -e "INFO: Staged for commit:\n$staged_commits\n"
 # shellcheck disable=SC1090
 source ~/lf-env.sh
 
-lf-activate-venv "git-review==1.28"
+lf-activate-venv --python python3 "git-review==2.3.1"
 
 # Query for a pre-existing gerrit review
 query_result=$(ssh -p 29418 "$GERRIT_USER@$GERRIT_HOST" gerrit query \
@@ -75,4 +75,7 @@ git remote add gerrit "ssh://$GERRIT_USER@$GERRIT_HOST:29418/$PROJECT.git"
 # If the reviewers email is unset/empty then use a default
 reviewers_email=${REVIEWERS_EMAIL:-"$GERRIT_USER@$GERRIT_HOST"}
 
+# Workaround for git-review failing to copy the commit-msg hook to submodules
+git config core.hooksPath "$(git rev-parse --show-toplevel)/.git/hooks"
+
 git review --yes -t "$GERRIT_TOPIC" --reviewers "$reviewers_email"