build: short-circuit build for AIO tasks
This commit is contained in:
parent
0f79223008
commit
b5ffbe342b
|
@ -14,7 +14,29 @@ if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then
|
|||
exit 1;
|
||||
fi
|
||||
|
||||
if [[ ${CI_MODE:-} == "bazel" ]]; then
|
||||
# No build needed for bazel or aio docs tests
|
||||
if [[ ${CI_MODE:-} == "bazel" || ${CI_MODE:-} == "docs_test" ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# Build angular.io, then exit (no Angular build required)
|
||||
if [[ ${CI_MODE:-} == "aio" ]]; then
|
||||
travisFoldStart "build.aio"
|
||||
(
|
||||
cd "`dirname $0`/../../aio"
|
||||
yarn build
|
||||
|
||||
# If this is a PR for angular/angular@master or angular/angular@<stable-branch>, deploy a
|
||||
# snapshot for previewing early (if preconditions are met) regardless of the test outcome.
|
||||
if [[ ${TRAVIS_REPO_SLUG} == "angular/angular" ]] &&
|
||||
([[ $TRAVIS_BRANCH == "master" ]] || [[ $TRAVIS_BRANCH == $STABLE_BRANCH ]]) &&
|
||||
[[ $TRAVIS_PULL_REQUEST != "false" ]]; then
|
||||
travisFoldStart "deploy.aio.pr-preview"
|
||||
yarn deploy-preview -- --skip-build
|
||||
travisFoldEnd "deploy.aio.pr-preview"
|
||||
fi
|
||||
)
|
||||
travisFoldEnd "build.aio"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
|
@ -41,24 +63,3 @@ travisFoldStart "tsc a bunch of useless stuff"
|
|||
node dist/packages-dist/tsc-wrapped/src/main -p packages/router/tsconfig-build.json
|
||||
node dist/packages-dist/tsc-wrapped/src/main -p packages/forms/tsconfig-build.json
|
||||
travisFoldEnd "tsc a bunch of useless stuff"
|
||||
|
||||
|
||||
# Build angular.io
|
||||
if [[ ${CI_MODE:-} == "aio" ]]; then
|
||||
travisFoldStart "build.aio"
|
||||
(
|
||||
cd "`dirname $0`/../../aio"
|
||||
yarn build
|
||||
|
||||
# If this is a PR for angular/angular@master or angular/angular@<stable-branch>, deploy a
|
||||
# snapshot for previewing early (if preconditions are met) regardless of the test outcome.
|
||||
if [[ ${TRAVIS_REPO_SLUG} == "angular/angular" ]] &&
|
||||
([[ $TRAVIS_BRANCH == "master" ]] || [[ $TRAVIS_BRANCH == $STABLE_BRANCH ]]) &&
|
||||
[[ $TRAVIS_PULL_REQUEST != "false" ]]; then
|
||||
travisFoldStart "deploy.aio.pr-preview"
|
||||
yarn deploy-preview -- --skip-build
|
||||
travisFoldEnd "deploy.aio.pr-preview"
|
||||
fi
|
||||
)
|
||||
travisFoldEnd "build.aio"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue