Update download-latest.sh

This commit is contained in:
Clémentine Urquizar 2021-10-16 14:55:06 +02:00 committed by GitHub
parent d9165c7f77
commit 306a8cd059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,8 +73,7 @@ semverLT() {
get_latest() {
temp_file='temp_file' # temp_file needed because the grep would start before the download is over
if [[ -z "${GITHUB_PAT}" ]]
then
if [ -z "$GITHUB_PAT" ]; then
curl -s 'https://api.github.com/repos/meilisearch/MeiliSearch/releases' > "$temp_file" || return 1
else
curl -H "Authorization: token ${GITHUB_PAT}" -s 'https://api.github.com/repos/meilisearch/MeiliSearch/releases' > "$temp_file" || return 1