File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4+ # PATCH_RELEASE_NAME should be the name of the release that is being done without the patch number. (e.g. v1.2.x)
45PATCH_RELEASE_NAME=$1
56PATCH_RELEASE_BRANCH=release/$PATCH_RELEASE_NAME
67PR_NUMBER=$2
@@ -11,7 +12,7 @@ PR_NUMBER=$2
1112# Check if no arguments are provided
1213if [ $# -eq 0 ]; then
1314 echo " Usage: $0 <patch-release-name> <pr-number>"
14- echo " <patch-release-name>: v1.2.x or release/v1.2.x "
15+ echo " <patch-release-name>: v1.2.x"
1516 echo " <pr-number>: PR number to backport"
1617 exit 1
1718fi
@@ -20,9 +21,10 @@ if [ -z "$PATCH_RELEASE_NAME" ]; then
2021 echo " Patch release name is not provided: $0 <patch-release-name> <pr-number>"
2122 exit 1
2223fi
23- # Check patch release name starts with "release/"
24- if [[ ! " $PATCH_RELEASE_NAME " =~ ^release/.* ]]; then
25- PATCH_RELEASE_NAME=" release/$PATCH_RELEASE_NAME "
24+ # Check patch release name does not start with "release/"
25+ if [[ " $PATCH_RELEASE_NAME " =~ ^release/.* ]]; then
26+ 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)"
27+ exit 1
2628fi
2729# Check PR number is provided
2830if [ -z " $PR_NUMBER " ]; then
You can’t perform that action at this time.
0 commit comments