fix: Fix download mmctl script and point it to proper release branch (#23488)

This commit is contained in:
Antonis Stamatiou
2023-05-24 15:11:14 +03:00
committed by GitHub
parent 88d1743191
commit 3ac15290ef

View File

@@ -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