1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

ci: use travis jobs to structure the CI flow

This mostly re-phrases the existing flow using the new language.

Ref. https://blog.travis-ci.com/2017-05-11-introducing-build-stages
This commit is contained in:
Ivan Grokhotkov
2018-12-11 18:37:24 +08:00
committed by Ivan Grokhotkov
parent 47d6f83f5f
commit 9c1e03a1f9
2 changed files with 99 additions and 65 deletions

View File

@ -18,8 +18,7 @@ else
plain_ver=$ver
fi
# 'set -e' breaks CI but not local tests
#set -e
set -e
package_name=esp8266-$ver
echo "Version: $ver"
@ -134,8 +133,13 @@ fi
cat $srcdir/package/package_esp8266com_index.template.json | \
jq "$jq_arg" > package_esp8266com_index.json
# Use Github API token, if available
curl_gh_token_arg=()
if [ ! -z "$CI_GITHUB_API_KEY" ]; then
curl_gh_token_arg=(-H "Authorization: token $CI_GITHUB_API_KEY")
fi
# Get previous release name
curl --silent https://api.github.com/repos/esp8266/Arduino/releases > releases.json
curl --silent "${curl_gh_token_arg[@]}" https://api.github.com/repos/esp8266/Arduino/releases > releases.json
# Previous final release (prerelase == false)
prev_release=$(jq -r '. | map(select(.draft == false and .prerelease == false)) | sort_by(.created_at | - fromdateiso8601) | .[0].tag_name' releases.json)
# Previous release (possibly a pre-release)