parent
67dc0912c5
commit
9d8c467cb0
12
.travis.yml
12
.travis.yml
|
@ -28,12 +28,12 @@ env:
|
||||||
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
|
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
|
||||||
matrix:
|
matrix:
|
||||||
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
||||||
- CI_MODE=js
|
- CI_MODE=e2e EXPERIMENTAL_ES2015_DISTRO=1
|
||||||
- CI_MODE=e2e
|
- CI_MODE=js
|
||||||
- CI_MODE=saucelabs_required
|
- CI_MODE=saucelabs_required
|
||||||
- CI_MODE=browserstack_required
|
- CI_MODE=browserstack_required
|
||||||
- CI_MODE=saucelabs_optional
|
- CI_MODE=saucelabs_optional
|
||||||
- CI_MODE=browserstack_optional
|
- CI_MODE=browserstack_optional
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
|
@ -155,7 +155,13 @@ You can check that your code is properly formatted and adheres to coding style b
|
||||||
$ gulp lint
|
$ gulp lint
|
||||||
```
|
```
|
||||||
|
|
||||||
## Publishing your own personal snapshot build
|
## Publishing snapshot builds
|
||||||
|
|
||||||
|
When the `master` branch successfully builds on Travis, it automatically publishes build artifacts
|
||||||
|
to repositories in the Angular org, eg. the `@angular/core` package is published to
|
||||||
|
http://github.com/angular/core-builds.
|
||||||
|
The ES2015 version of Angular is published to a different branch in these repos, for example
|
||||||
|
http://github.com/angular/core-builds#master-es2015
|
||||||
|
|
||||||
You may find that your un-merged change needs some validation from external participants.
|
You may find that your un-merged change needs some validation from external participants.
|
||||||
Rather than requiring them to pull your Pull Request and build Angular locally, you can
|
Rather than requiring them to pull your Pull Request and build Angular locally, you can
|
||||||
|
|
|
@ -58,11 +58,6 @@ if [[ ${TRAVIS} ]]; then
|
||||||
# more info: https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements
|
# more info: https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements
|
||||||
export CXX=g++-4.8
|
export CXX=g++-4.8
|
||||||
|
|
||||||
# Build ES2015 distro only in the e2e job (don't need to slow down other jobs)
|
|
||||||
if [ "${CI_MODE}" = "e2e" ]; then
|
|
||||||
export EXPERIMENTAL_ES2015_DISTRO=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Used by karma and karma-chrome-launcher
|
# Used by karma and karma-chrome-launcher
|
||||||
# In order to have a meaningful SauceLabs badge on the repo page,
|
# In order to have a meaningful SauceLabs badge on the repo page,
|
||||||
# the angular2-ci account is used only when pushing commits to master;
|
# the angular2-ci account is used only when pushing commits to master;
|
||||||
|
|
|
@ -68,10 +68,10 @@ function publishRepo {
|
||||||
|
|
||||||
# Publish all individual packages from packages-dist.
|
# Publish all individual packages from packages-dist.
|
||||||
function publishPackages {
|
function publishPackages {
|
||||||
PKGS_DIST=dist/packages-dist
|
GIT_SCHEME=$1
|
||||||
if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then
|
PKGS_DIST=$2
|
||||||
PKGS_DIST=dist/packages-dist-es2015
|
BRANCH=$3
|
||||||
fi
|
|
||||||
for dir in $PKGS_DIST/*/ dist/tools/@angular/tsc-wrapped
|
for dir in $PKGS_DIST/*/ dist/tools/@angular/tsc-wrapped
|
||||||
do
|
do
|
||||||
COMPONENT="$(basename ${dir})"
|
COMPONENT="$(basename ${dir})"
|
||||||
|
@ -80,12 +80,12 @@ function publishPackages {
|
||||||
COMPONENT="${COMPONENT//_/-}"
|
COMPONENT="${COMPONENT//_/-}"
|
||||||
JS_BUILD_ARTIFACTS_DIR="${dir}"
|
JS_BUILD_ARTIFACTS_DIR="${dir}"
|
||||||
|
|
||||||
if [[ "$1" == "ssh" ]]; then
|
if [[ "$GIT_SCHEME" == "ssh" ]]; then
|
||||||
REPO_URL="git@github.com:${ORG}/${COMPONENT}-builds.git"
|
REPO_URL="git@github.com:${ORG}/${COMPONENT}-builds.git"
|
||||||
elif [[ "$1" == "http" ]]; then
|
elif [[ "$GIT_SCHEME" == "http" ]]; then
|
||||||
REPO_URL="https://github.com/${ORG}/${COMPONENT}-builds.git"
|
REPO_URL="https://github.com/${ORG}/${COMPONENT}-builds.git"
|
||||||
else
|
else
|
||||||
die "Don't have a way to publish to scheme $1"
|
die "Don't have a way to publish to scheme $GIT_SCHEME"
|
||||||
fi
|
fi
|
||||||
SHA=`git rev-parse HEAD`
|
SHA=`git rev-parse HEAD`
|
||||||
SHORT_SHA=`git rev-parse --short HEAD`
|
SHORT_SHA=`git rev-parse --short HEAD`
|
||||||
|
@ -101,16 +101,24 @@ function publishPackages {
|
||||||
}
|
}
|
||||||
|
|
||||||
# See DEVELOPER.md for help
|
# See DEVELOPER.md for help
|
||||||
BRANCH=${TRAVIS_BRANCH:-$(git symbolic-ref --short HEAD)}
|
CUR_BRANCH=${TRAVIS_BRANCH:-$(git symbolic-ref --short HEAD)}
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
ORG=$1
|
ORG=$1
|
||||||
publishPackages "ssh"
|
publishPackages "ssh" dist/packages-dist $CUR_BRANCH
|
||||||
|
if [[ -e dist/packages-dist-es2015 ]]; then
|
||||||
|
publishPackages "ssh" dist/packages-dist-es2015 ${CUR_BRANCH}-es2015
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ \
|
elif [[ \
|
||||||
"$TRAVIS_REPO_SLUG" == "angular/angular" && \
|
"$TRAVIS_REPO_SLUG" == "angular/angular" && \
|
||||||
"$TRAVIS_PULL_REQUEST" == "false" && \
|
"$TRAVIS_PULL_REQUEST" == "false" && \
|
||||||
"$CI_MODE" == "e2e" ]]; then
|
"$CI_MODE" == "e2e" ]]; then
|
||||||
ORG="angular"
|
ORG="angular"
|
||||||
publishPackages "http"
|
publishPackages "http" dist/packages-dist $CUR_BRANCH
|
||||||
|
if [[ -e dist/packages-dist-es2015 ]]; then
|
||||||
|
publishPackages "http" dist/packages-dist-es2015 ${CUR_BRANCH}-es2015
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Not building the upstream/${BRANCH} branch, build artifacts won't be published."
|
echo "Not building the upstream/${CUR_BRANCH} branch, build artifacts won't be published."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue