mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
wip
This commit is contained in:
parent
c7156e1dc9
commit
55b9a2ef55
@ -88,7 +88,6 @@ jobs:
|
||||
skip_cleanup: true
|
||||
api_key:
|
||||
secure: kYsxX/N21fwLSTLpbb0c96PnQHn1CIMqZstm02hfUhCX83FygWSh4vs3gzW28DMpjQMZ6vC4g+jtfosYU2tUhht/bynurDH4edpEyGeMyK+fzCI9pAr4JT0RbKQI84EC18ScpgP/UP0jTc1LJ+xl8UMwSiDE0mzHx7xJ4mMNQbA=
|
||||
#secure: vt6StBC+ghqnh8YrreNo3wAzGGddJ2S4YpVZkz4S84xLEGWkIEghQhTrjlhzjBsrnHfLNko4tz9EsNx0yQ8yBlPOdReETGAkqnAU7PSPFss0qGcCRUXYtozNjbFQq6TWIxECK4xq40R9tE6NyeOpm9AYJtwF/v18u2T+T9qSgGQ=
|
||||
file_glob: true
|
||||
tag_name: $TRAVIS_TAG
|
||||
target_commitish: $TRAVIS_COMMIT
|
||||
|
@ -123,23 +123,24 @@ fi
|
||||
cat $srcdir/package/package_esp8266com_index.template.json | \
|
||||
jq "$jq_arg" > package_esp8266com_index.json
|
||||
|
||||
# Use Github API token, must be available
|
||||
# Use Github API token, when available
|
||||
curl_gh_token_arg=()
|
||||
if [ -z "$CI_GITHUB_API_KEY" ]; then
|
||||
echo "curl: API key not present"
|
||||
echo "running: 'curl --silent -D curl-headers.txt https://api.github.com/repos/esp8266/Arduino/releases'"
|
||||
curl --silent -D curl-headers.txt https://api.github.com/repos/esp8266/Arduino/releases > releases.json
|
||||
else
|
||||
echo "curl: API key is present"
|
||||
echo "running: 'curl --silent -D curl-headers.txt -H \"Authorization: token $CI_GITHUB_API_KEY\" https://api.github.com/repos/esp8266/Arduino/releases'"
|
||||
curl --silent -D curl-headers.txt -H "Authorization: token $CI_GITHUB_API_KEY" https://api.github.com/repos/esp8266/Arduino/releases > releases.json
|
||||
curl_gh_token_arg=(-H "Authorization: token $CI_GITHUB_API_KEY")
|
||||
fi
|
||||
|
||||
# Get previous release name
|
||||
curl --silent -D curl-headers.txt "${curl_gh_token_arg[@]}" https://api.github.com/repos/esp8266/Arduino/releases > releases.json
|
||||
|
||||
echo "======== >>> curl dumped header >>>"
|
||||
cat curl-headers.txt
|
||||
echo "======== <<< curl dumped header <<<"
|
||||
if ! grep "HTTP.*200 OK" curl-headers.txt > /dev/null; then
|
||||
if [ -z "$CI_GITHUB_API_KEY" ]; then
|
||||
# github api is rate-limiting
|
||||
echo "---- Bad moon phase, in a PR, exit successfully"
|
||||
exit 0
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user