mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Updating the mmctl process to set the value once and than use it. Also added the basic auth code from agniva
This commit is contained in:
2
Makefile
2
Makefile
@@ -115,7 +115,7 @@ ALL_PACKAGES=$(TE_PACKAGES)
|
||||
endif
|
||||
|
||||
# Decide what version of prebuilt binaries to download. This will use the release-* branch names or change to the latest.
|
||||
MMCTL_REL_TO_DOWNLOAD = $(shell scripts/get_latest_release.sh 'mattermost/mmctl' 'release-')
|
||||
MMCTL_REL_TO_DOWNLOAD:=$(shell scripts/get_latest_release.sh 'mattermost/mmctl' 'release-')
|
||||
|
||||
all: run ## Alias for 'run'.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ BASIC_AUTH=""
|
||||
# If we find a github username and token, we use that.
|
||||
# In CI, these variables are available and useful to avoid rate limits which is
|
||||
# much more strict for unauthenticated requests.
|
||||
if [[ $GITHUB_USERNAME != "" && $GITHUB_TOKEN != "" ]];
|
||||
if [[ ! -z "$GITHUB_USERNAME" && ! -z "$GITHUB_TOKEN" ]];
|
||||
then
|
||||
BASIC_AUTH="--user $GITHUB_USERNAME:$GITHUB_TOKEN"
|
||||
fi
|
||||
@@ -44,7 +44,7 @@ if [[ "$THIS_BRANCH" =~ $BRANCH_TO_USE || $DRAFT =~ "true" ]]; then
|
||||
REL_TO_USE=$(curl --silent $BASIC_AUTH "https://api.github.com/repos/$REPO_TO_USE/releases" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed -n "/$VERSION_REL/p" | sort -rV | head -n 1)
|
||||
elif [[ "$THIS_BRANCH" =~ "master" ]]; then
|
||||
# Get the latest release even if its a pre-release
|
||||
REL_TO_USE=$(curl --silent $BASIC_AUTH" https://api.github.com/repos/$REPO_TO_USE/releases" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sort -rV | head -n 1)
|
||||
REL_TO_USE=$(curl --silent $BASIC_AUTH "https://api.github.com/repos/$REPO_TO_USE/releases" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sort -rV | head -n 1)
|
||||
else
|
||||
REL_TO_USE=$LATEST_REL
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user