1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-24 14:48:14 +03:00
This commit is contained in:
David Gauchard
2018-12-13 18:26:49 +01:00
parent f3aba892c3
commit 6cb7fcebb0
2 changed files with 6 additions and 5 deletions

View File

@@ -124,17 +124,17 @@ cat $srcdir/package/package_esp8266com_index.template.json | \
jq "$jq_arg" > package_esp8266com_index.json
# Use Github API token, must be 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 > releases.json'"
curl --silent -D curl-headers.txt https://api.github.com/repos/esp8266/Arduino/releases > releases.json
else
echo "curl: API key is present"
curl_gh_token_arg=(-H "Authorization: token $CI_GITHUB_API_KEY")
echo "running: 'curl --silent -D curl-headers.txt -H \"Authorization: token $CI_GITHUB_API_KEY\" https://api.github.com/repos/esp8266/Arduino/releases > releases.json'"
curl --silent -D curl-headers.txt -H "Authorization: token $CI_GITHUB_API_KEY" https://api.github.com/repos/esp8266/Arduino/releases > releases.json
fi
# Get previous release name
echo "running: 'curl --silent -D curl-headers.txt ${curl_gh_token_arg[@]} https://api.github.com/repos/esp8266/Arduino/releases > releases.json'"
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 <<<"