From 6b44143026174fe88981c2eba489f94006eedfaf Mon Sep 17 00:00:00 2001 From: mhlidd Date: Fri, 27 Jun 2025 11:34:02 -0400 Subject: [PATCH 1/2] Update backport-pr-to-patch-release.sh to not allow release branch name as patch release name --- tooling/backport-pr-to-patch-release.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tooling/backport-pr-to-patch-release.sh b/tooling/backport-pr-to-patch-release.sh index 52c1097c77b..85106d169f7 100755 --- a/tooling/backport-pr-to-patch-release.sh +++ b/tooling/backport-pr-to-patch-release.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e +# PATCH_RELEASE_NAME should be the name of the release that is being done without the patch number. PATCH_RELEASE_NAME=$1 PATCH_RELEASE_BRANCH=release/$PATCH_RELEASE_NAME PR_NUMBER=$2 @@ -11,7 +12,7 @@ PR_NUMBER=$2 # Check if no arguments are provided if [ $# -eq 0 ]; then echo "Usage: $0 " - echo ": v1.2.x or release/v1.2.x" + echo ": v1.2.x" echo ": PR number to backport" exit 1 fi @@ -20,9 +21,10 @@ if [ -z "$PATCH_RELEASE_NAME" ]; then echo "Patch release name is not provided: $0 " exit 1 fi -# Check patch release name starts with "release/" -if [[ ! "$PATCH_RELEASE_NAME" =~ ^release/.* ]]; then - PATCH_RELEASE_NAME="release/$PATCH_RELEASE_NAME" +# Check patch release name does not start with "release/" +if [[ "$PATCH_RELEASE_NAME" =~ ^release/.* ]]; then + echo "Patch release name should not be the same as the release branch name. Only include the release name without patch number. (e.g. 1.2.x)" + exit 1 fi # Check PR number is provided if [ -z "$PR_NUMBER" ]; then From a74c24fa159a1a4c4aa0da9cf0396236c4f84025 Mon Sep 17 00:00:00 2001 From: mhlidd Date: Fri, 27 Jun 2025 11:44:23 -0400 Subject: [PATCH 2/2] Update backport-pr-to-patch-release.sh --- tooling/backport-pr-to-patch-release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tooling/backport-pr-to-patch-release.sh b/tooling/backport-pr-to-patch-release.sh index 85106d169f7..adc25b4804b 100755 --- a/tooling/backport-pr-to-patch-release.sh +++ b/tooling/backport-pr-to-patch-release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -# PATCH_RELEASE_NAME should be the name of the release that is being done without the patch number. +# PATCH_RELEASE_NAME should be the name of the release that is being done without the patch number. (e.g. v1.2.x) PATCH_RELEASE_NAME=$1 PATCH_RELEASE_BRANCH=release/$PATCH_RELEASE_NAME PR_NUMBER=$2 @@ -23,7 +23,7 @@ if [ -z "$PATCH_RELEASE_NAME" ]; then fi # Check patch release name does not start with "release/" if [[ "$PATCH_RELEASE_NAME" =~ ^release/.* ]]; then - echo "Patch release name should not be the same as the release branch name. Only include the release name without patch number. (e.g. 1.2.x)" + echo "Patch release name should not be the same as the release branch name. Only include the release name without patch number. (e.g. v1.2.x)" exit 1 fi # Check PR number is provided