ci(aio): deploy commits on the stable branch to production

The current stable branch is determined based on the current version mapped to
the npm `latest` tag (by replacing the patch version number with 'x' - e.g.
`1.2.3` --> `1.2.x`).
PRs against the stable branch will be deployed to the preview server (as long as
the rest of the requirements are met). Commits on the stable branch itself will
be deployed to production.

Fixes #16908
This commit is contained in:
Georgios Kalpakas
2017-05-23 11:36:02 +03:00
committed by Alex Rickabaugh
parent ed73d4f3ac
commit 234268eec2
7 changed files with 74 additions and 50 deletions

View File

@ -59,6 +59,10 @@ if [[ ${TRAVIS:-} ]]; then
setEnvVar KARMA_JS_BROWSERS `node -e "console.log(require('/home/travis/build/angular/angular/browser-providers.conf').browserstackAliases.CI_OPTIONAL.join(','))"`
;;
aio)
# Determine the current stable branch.
readonly versionRe="^\s*([0-9]+\.[0-9]+)\.[0-9]+.*$"
setEnvVar STABLE_BRANCH `npm info @angular/core dist-tags.latest | sed -r "s/$versionRe/\1.x/"`
setEnvVar MIN_PWA_SCORE 95
;;
esac