[fix] download mmctl release script
Going from `release-7.9` to `release-7.10,` has introduced a bug, in the download_mmctl_release.sh script, in which it is unable to o match version numbers with multiple digits Specifically, `release-7.10` returned `release-7.1` downloading wrong mmctl binary. We are refactoring the regular expression used, to match version numbers with multiple digits. Ticket: https://mattermost.atlassian.net/browse/CLD-5682
Этот коммит содержится в:
коммит произвёл
Akis Maziotis
родитель
5808b848c3
Коммит
ce165302cf
@@ -15,13 +15,13 @@ fi
|
|||||||
|
|
||||||
BIN_PATH=${2:-bin}
|
BIN_PATH=${2:-bin}
|
||||||
|
|
||||||
# strip whitespace
|
|
||||||
THIS_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
THIS_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
if [[ "$THIS_BRANCH" =~ 'release-'[0-9] ]];
|
RELEASE_PATTERN='release-[0-9]+\.[0-9]+(\.[0-9]+)?'
|
||||||
then
|
if [[ $THIS_BRANCH =~ $RELEASE_PATTERN ]]; then
|
||||||
RELEASE_TO_DOWNLOAD=$(echo $THIS_BRANCH | grep -Eo 'release-([0-9](\.){0,1})\.([0-9](\.){0,1})')
|
RELEASE_TO_DOWNLOAD=$THIS_BRANCH
|
||||||
else
|
else
|
||||||
RELEASE_TO_DOWNLOAD=master
|
RELEASE_TO_DOWNLOAD="master"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading prepackaged binary: https://releases.mattermost.com/mmctl/$RELEASE_TO_DOWNLOAD";
|
echo "Downloading prepackaged binary: https://releases.mattermost.com/mmctl/$RELEASE_TO_DOWNLOAD";
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user