From fc444204b3749106d6d0d436445bf26f8a656c2f Mon Sep 17 00:00:00 2001 From: Akis Maziotis <36594156+phoinixgrr@users.noreply.github.com> Date: Tue, 19 Apr 2022 10:24:14 +0300 Subject: [PATCH] Fix mmctl download bash script (#20014) There are cases that instead of suffix, we get a SHA prefix for cherrypicking branch We rewrite the regex to support this case --- scripts/download_mmctl_release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download_mmctl_release.sh b/scripts/download_mmctl_release.sh index 0b854c0b98..d85e579448 100755 --- a/scripts/download_mmctl_release.sh +++ b/scripts/download_mmctl_release.sh @@ -19,7 +19,7 @@ BIN_PATH=${2:-bin} THIS_BRANCH=$(git rev-parse --abbrev-ref HEAD) if [[ "$THIS_BRANCH" =~ 'release-'[0-9] ]]; then - RELEASE_TO_DOWNLOAD=$(echo $THIS_BRANCH | grep -Eo 'release-.*') + RELEASE_TO_DOWNLOAD=$(echo $THIS_BRANCH | grep -Eo 'release-([0-9](\.){0,1})\.([0-9](\.){0,1})') else RELEASE_TO_DOWNLOAD=master fi