From 4952744dec3ab05424107c912e6302da683fc2bb Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 21 Oct 2025 10:52:16 -0600 Subject: [PATCH] qa/validate-cp: check main-8.0.x branch as well For the 7.0.x, allow cherry pick's from main as well as main-8.0.x. --- qa/validate-cp.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/qa/validate-cp.sh b/qa/validate-cp.sh index 0f076bc69c..3745d1e58d 100755 --- a/qa/validate-cp.sh +++ b/qa/validate-cp.sh @@ -9,20 +9,26 @@ if [ $# -ne 1 ]; then fi BASE=$1 -CHECK_BRANCH="${VALIDATE_CHECK_BRANCH:-remotes/origin/main}" + +if [ -z "${CHECK_BRANCHES}" ]; then + CHECK_BRANCHES="remotes/origin/main remotes/origin/main-8.0.x" +fi test_cherrypicked_line() { REV=$1 #echo "\"REV $REV\"" CHERRY=$(echo $REV | grep '(cherry picked from commit' | awk '{print $5}'|awk -F')' '{print $1}' || return 1) - git branch -a --contains $CHERRY | grep " $CHECK_BRANCH$" &> /dev/null - if [ "$?" -ne 0 ]; then - echo -n "ERROR $CHERRY not found in $CHECK_BRANCH" - return 1 - else - echo -n "OK " - fi + + for branch in ${CHECK_BRANCHES}; do + if git branch -a --contains ${CHERRY} | grep " ${branch}" &> /dev/null; then + echo -n "OK " + return + fi + done + + echo -n "ERROR $CHERRY not found in $CHECK_BRANCH" + return 1 } for rev in $(git rev-list --reverse origin/${BASE}..HEAD); do