mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-28 05:01:28 +03:00
igrr fix from feature/travis_jobs_tmp
This commit is contained in:
@ -134,12 +134,18 @@ cat $srcdir/package/package_esp8266com_index.template.json | \
|
|||||||
jq "$jq_arg" > package_esp8266com_index.json
|
jq "$jq_arg" > package_esp8266com_index.json
|
||||||
|
|
||||||
# Use Github API token, if available
|
# Use Github API token, if available
|
||||||
curl_gh_token_arg=()
|
curl_gh_token_arg=""
|
||||||
if [ ! -z "$CI_GITHUB_API_KEY" ]; then
|
if [ ! -z "$CI_GITHUB_API_KEY" ]; then
|
||||||
curl_gh_token_arg=(-H "Authorization: token $CI_GITHUB_API_KEY")
|
echo "Authorization using CI_GITHUB_API_KEY"
|
||||||
|
curl_gh_token_arg="-H \"Authorization: token $CI_GITHUB_API_KEY\""
|
||||||
|
else
|
||||||
|
echo "Warning: CI_GITHUB_API_KEY not set"
|
||||||
fi
|
fi
|
||||||
|
echo "===================================="
|
||||||
|
curl $curl_gh_token_arg -D - https://api.github.com/repos/esp8266/Arduino/releases
|
||||||
|
echo "===================================="
|
||||||
# Get previous release name
|
# Get previous release name
|
||||||
curl --silent "${curl_gh_token_arg[@]}" https://api.github.com/repos/esp8266/Arduino/releases > releases.json
|
curl --silent $curl_gh_token_arg https://api.github.com/repos/esp8266/Arduino/releases > releases.json
|
||||||
# Previous final release (prerelase == false)
|
# Previous final release (prerelase == false)
|
||||||
prev_release=$(jq -r '. | map(select(.draft == false and .prerelease == false)) | sort_by(.created_at | - fromdateiso8601) | .[0].tag_name' releases.json)
|
prev_release=$(jq -r '. | map(select(.draft == false and .prerelease == false)) | sort_by(.created_at | - fromdateiso8601) | .[0].tag_name' releases.json)
|
||||||
# Previous release (possibly a pre-release)
|
# Previous release (possibly a pre-release)
|
||||||
|
Reference in New Issue
Block a user