File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 85
85
stage : deploy
86
86
script : $TRAVIS_BUILD_DIR/tests/common.sh
87
87
env : BUILD_TYPE=package
88
- if : env(CI_GITHUB_API_KEY) IS present
88
+ # TRAVIS_PULL_REQUEST is set to the pull request number if the current job is a pull request build, or false if it’s not.
89
+ if : env(TRAVIS_PULL_REQUEST) != "false"
89
90
deploy :
90
91
# Create Github release, upload artifacts
91
92
- provider : releases
Original file line number Diff line number Diff line change 124
124
cat $srcdir /package/package_esp8266com_index.template.json | \
125
125
jq " $jq_arg " > package_esp8266com_index.json
126
126
127
- # Use Github API token, if available
127
+ # Use Github API token, must be available
128
128
curl_gh_token_arg=()
129
129
if [ -z " $CI_GITHUB_API_KEY " ]; then
130
- echo " curl: API key not present, exit with no error"
131
- exit 0
132
- else
133
- curl_gh_token_arg=(-H " Authorization: token $CI_GITHUB_API_KEY " )
130
+ echo " curl: API key not present, exit with error"
131
+ exit 1
134
132
fi
133
+ curl_gh_token_arg=(-H " Authorization: token $CI_GITHUB_API_KEY " )
134
+
135
135
# Get previous release name
136
136
curl --silent -D /dev/stderr ${curl_gh_token_arg[@]} https://api.github.com/repos/esp8266/Arduino/releases > releases.json
137
137
You can’t perform that action at this time.
0 commit comments