1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00
This commit is contained in:
David Gauchard 2018-12-13 14:27:09 +01:00
parent bce2c99831
commit c762de34f5
2 changed files with 13 additions and 10 deletions

View File

@ -78,7 +78,6 @@ jobs:
# Deploy stage. # Deploy stage.
# Here we build the package JSON (always) and do the deployments # Here we build the package JSON (always) and do the deployments
- name: "Package / deploy" - name: "Package / deploy"
if: type != pull_request
stage: deploy stage: deploy
script: $TRAVIS_BUILD_DIR/tests/common.sh script: $TRAVIS_BUILD_DIR/tests/common.sh
env: BUILD_TYPE=package env: BUILD_TYPE=package

View File

@ -127,19 +127,23 @@ cat $srcdir/package/package_esp8266com_index.template.json | \
# Use Github API token, must be available # Use Github API token, must be available
curl_gh_token_arg=() curl_gh_token_arg=()
if [ -z "$CI_GITHUB_API_KEY" ]; then if [ -z "$CI_GITHUB_API_KEY" ]; then
echo "curl: API key not present, exit with error" echo "curl: API key not present"
exit 1 else
echo "curl: API key is present"
curl_gh_token_arg=(-H "Authorization: token $CI_GITHUB_API_KEY")
fi fi
curl_gh_token_arg=(-H "Authorization: token $CI_GITHUB_API_KEY")
# test
#echo "key was '$CI_GITHUB_API_KEY'"
# this key (below) is working, the overwritten key is not empty
#CI_GITHUB_API_KEY="vt6StBC+ghqnh8YrreNo3wAzGGddJ2S4YpVZkz4S84xLEGWkIEghQhTrjlhzjBsrnHfLNko4tz9EsNx0yQ8yBlPOdReETGAkqnAU7PSPFss0qGcCRUXYtozNjbFQq6TWIxECK4xq40R9tE6NyeOpm9AYJtwF/v18u2T+T9qSgGQ="
# Get previous release name # Get previous release name
echo "======== curl dumped header" echo "======== curl dumped header"
curl --silent -D /dev/stderr ${curl_gh_token_arg[@]} https://api.github.com/repos/esp8266/Arduino/releases > releases.json if ! curl --silent -D /dev/stderr ${curl_gh_token_arg[@]} https://api.github.com/repos/esp8266/Arduino/releases > releases.json; then
if [ -z "$CI_GITHUB_API_KEY" ]; then
echo "---- Bad moon phase, in a PR, exit successfully"
exit 0
else
echo "---- Please debug curl request, exit with error"
exit 1
fi
fi
echo "======== curl" echo "======== curl"
# Previous final release (prerelase == false) # Previous final release (prerelase == false)