File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7878 # Deploy stage.
7979 # Here we build the package JSON (always) and do the deployments
8080 - name : " Package / deploy"
81- if : type != pull_request
8281 stage : deploy
8382 script : $TRAVIS_BUILD_DIR/tests/common.sh
8483 env : BUILD_TYPE=package
Original file line number Diff line number Diff line change @@ -127,19 +127,23 @@ cat $srcdir/package/package_esp8266com_index.template.json | \
127127# Use Github API token, must be available
128128curl_gh_token_arg=()
129129if [ -z " $CI_GITHUB_API_KEY " ]; then
130- echo " curl: API key not present, exit with error"
131- exit 1
130+ echo " curl: API key not present"
131+ else
132+ echo " curl: API key is present"
133+ curl_gh_token_arg=(-H " Authorization: token $CI_GITHUB_API_KEY " )
132134fi
133- curl_gh_token_arg=(-H " Authorization: token $CI_GITHUB_API_KEY " )
134-
135- # test
136- # echo "key was '$CI_GITHUB_API_KEY'"
137- # this key (below) is working, the overwritten key is not empty
138- # CI_GITHUB_API_KEY="vt6StBC+ghqnh8YrreNo3wAzGGddJ2S4YpVZkz4S84xLEGWkIEghQhTrjlhzjBsrnHfLNko4tz9EsNx0yQ8yBlPOdReETGAkqnAU7PSPFss0qGcCRUXYtozNjbFQq6TWIxECK4xq40R9tE6NyeOpm9AYJtwF/v18u2T+T9qSgGQ="
139135
140136# Get previous release name
141137echo " ======== curl dumped header"
142- curl --silent -D /dev/stderr ${curl_gh_token_arg[@]} https://api.github.com/repos/esp8266/Arduino/releases > releases.json
138+ if ! curl --silent -D /dev/stderr ${curl_gh_token_arg[@]} https://api.github.com/repos/esp8266/Arduino/releases > releases.json; then
139+ if [ -z " $CI_GITHUB_API_KEY " ]; then
140+ echo " ---- Bad moon phase, in a PR, exit successfully"
141+ exit 0
142+ else
143+ echo " ---- Please debug curl request, exit with error"
144+ exit 1
145+ fi
146+ fi
143147echo " ======== curl"
144148
145149# Previous final release (prerelase == false)
You can’t perform that action at this time.
0 commit comments