File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 88
88
skip_cleanup : true
89
89
api_key :
90
90
secure : kYsxX/N21fwLSTLpbb0c96PnQHn1CIMqZstm02hfUhCX83FygWSh4vs3gzW28DMpjQMZ6vC4g+jtfosYU2tUhht/bynurDH4edpEyGeMyK+fzCI9pAr4JT0RbKQI84EC18ScpgP/UP0jTc1LJ+xl8UMwSiDE0mzHx7xJ4mMNQbA=
91
- # secure: vt6StBC+ghqnh8YrreNo3wAzGGddJ2S4YpVZkz4S84xLEGWkIEghQhTrjlhzjBsrnHfLNko4tz9EsNx0yQ8yBlPOdReETGAkqnAU7PSPFss0qGcCRUXYtozNjbFQq6TWIxECK4xq40R9tE6NyeOpm9AYJtwF/v18u2T+T9qSgGQ=
92
91
file_glob : true
93
92
tag_name : $TRAVIS_TAG
94
93
target_commitish : $TRAVIS_COMMIT
Original file line number Diff line number Diff line change 123
123
cat $srcdir /package/package_esp8266com_index.template.json | \
124
124
jq " $jq_arg " > package_esp8266com_index.json
125
125
126
- # Use Github API token, must be available
126
+ # Use Github API token, when available
127
+ curl_gh_token_arg=()
127
128
if [ -z " $CI_GITHUB_API_KEY " ]; then
128
129
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
131
130
else
132
131
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 " )
135
133
fi
136
134
137
135
# 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
+
138
138
echo " ======== >>> curl dumped header >>>"
139
139
cat curl-headers.txt
140
140
echo " ======== <<< curl dumped header <<<"
141
141
if ! grep " HTTP.*200 OK" curl-headers.txt > /dev/null; then
142
142
if [ -z " $CI_GITHUB_API_KEY " ]; then
143
+ # github api is rate-limiting
143
144
echo " ---- Bad moon phase, in a PR, exit successfully"
144
145
exit 0
145
146
else
You can’t perform that action at this time.
0 commit comments