From 3ac15290eff43439acf224a3c1160a953d1ef5b1 Mon Sep 17 00:00:00 2001 From: Antonis Stamatiou Date: Wed, 24 May 2023 15:11:14 +0300 Subject: [PATCH] fix: Fix download mmctl script and point it to proper release branch (#23488) --- server/scripts/download_mmctl_release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/scripts/download_mmctl_release.sh b/server/scripts/download_mmctl_release.sh index d95696252c..84c5e9f313 100755 --- a/server/scripts/download_mmctl_release.sh +++ b/server/scripts/download_mmctl_release.sh @@ -16,10 +16,11 @@ fi BIN_PATH=${2:-bin} +## If pattern release-X.Y exist in branch name we parse the release branch and we fallback to masterx THIS_BRANCH=$(git rev-parse --abbrev-ref HEAD) RELEASE_PATTERN='release-[0-9]+\.[0-9]+(\.[0-9]+)?' if [[ $THIS_BRANCH =~ $RELEASE_PATTERN ]]; then - RELEASE_TO_DOWNLOAD=$THIS_BRANCH + RELEASE_TO_DOWNLOAD=$(echo $THIS_BRANCH | grep -Eo 'release-([0-9]+)?\.([0-9]+)?') else RELEASE_TO_DOWNLOAD="master" fi