Skip to content

Commit 55b9a2e

Browse files
committed
wip
1 parent c7156e1 commit 55b9a2e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ jobs:
8888
skip_cleanup: true
8989
api_key:
9090
secure: kYsxX/N21fwLSTLpbb0c96PnQHn1CIMqZstm02hfUhCX83FygWSh4vs3gzW28DMpjQMZ6vC4g+jtfosYU2tUhht/bynurDH4edpEyGeMyK+fzCI9pAr4JT0RbKQI84EC18ScpgP/UP0jTc1LJ+xl8UMwSiDE0mzHx7xJ4mMNQbA=
91-
#secure: vt6StBC+ghqnh8YrreNo3wAzGGddJ2S4YpVZkz4S84xLEGWkIEghQhTrjlhzjBsrnHfLNko4tz9EsNx0yQ8yBlPOdReETGAkqnAU7PSPFss0qGcCRUXYtozNjbFQq6TWIxECK4xq40R9tE6NyeOpm9AYJtwF/v18u2T+T9qSgGQ=
9291
file_glob: true
9392
tag_name: $TRAVIS_TAG
9493
target_commitish: $TRAVIS_COMMIT

package/build_boards_manager_package.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,24 @@ fi
123123
cat $srcdir/package/package_esp8266com_index.template.json | \
124124
jq "$jq_arg" > package_esp8266com_index.json
125125

126-
# Use Github API token, must be available
126+
# Use Github API token, when available
127+
curl_gh_token_arg=()
127128
if [ -z "$CI_GITHUB_API_KEY" ]; then
128129
echo "curl: API key not present"
129-
echo "running: 'curl --silent -D curl-headers.txt https://api.github.com/repos/esp8266/Arduino/releases'"
130-
curl --silent -D curl-headers.txt https://api.github.com/repos/esp8266/Arduino/releases > releases.json
131130
else
132131
echo "curl: API key is present"
133-
echo "running: 'curl --silent -D curl-headers.txt -H \"Authorization: token $CI_GITHUB_API_KEY\" https://api.github.com/repos/esp8266/Arduino/releases'"
134-
curl --silent -D curl-headers.txt -H "Authorization: token $CI_GITHUB_API_KEY" https://api.github.com/repos/esp8266/Arduino/releases > releases.json
132+
curl_gh_token_arg=(-H "Authorization: token $CI_GITHUB_API_KEY")
135133
fi
136134

137135
# Get previous release name
136+
curl --silent -D curl-headers.txt "${curl_gh_token_arg[@]}" https://api.github.com/repos/esp8266/Arduino/releases > releases.json
137+
138138
echo "======== >>> curl dumped header >>>"
139139
cat curl-headers.txt
140140
echo "======== <<< curl dumped header <<<"
141141
if ! grep "HTTP.*200 OK" curl-headers.txt > /dev/null; then
142142
if [ -z "$CI_GITHUB_API_KEY" ]; then
143+
# github api is rate-limiting
143144
echo "---- Bad moon phase, in a PR, exit successfully"
144145
exit 0
145146
else

0 commit comments

Comments
 (0)