diff --git a/.travis.yml b/.travis.yml index 3bdb05466f6bd..067abdeb7cb7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,12 +28,12 @@ env: - secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo=" matrix: # 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 - - CI_MODE=saucelabs_required - - CI_MODE=browserstack_required - - CI_MODE=saucelabs_optional - - CI_MODE=browserstack_optional + - CI_MODE=e2e EXPERIMENTAL_ES2015_DISTRO=1 + - CI_MODE=js + - CI_MODE=saucelabs_required + - CI_MODE=browserstack_required + - CI_MODE=saucelabs_optional + - CI_MODE=browserstack_optional matrix: fast_finish: true diff --git a/DEVELOPER.md b/DEVELOPER.md index 0b7e18d617ebf..eb080a90caab0 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -155,7 +155,13 @@ You can check that your code is properly formatted and adheres to coding style b $ 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. Rather than requiring them to pull your Pull Request and build Angular locally, you can diff --git a/scripts/ci-lite/env.sh b/scripts/ci-lite/env.sh index 5467bf3d15897..fd57d09f91ca4 100644 --- a/scripts/ci-lite/env.sh +++ b/scripts/ci-lite/env.sh @@ -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 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 # In order to have a meaningful SauceLabs badge on the repo page, # the angular2-ci account is used only when pushing commits to master; diff --git a/scripts/publish/publish-build-artifacts.sh b/scripts/publish/publish-build-artifacts.sh index f478204d37fa8..55d58d71f2ae4 100755 --- a/scripts/publish/publish-build-artifacts.sh +++ b/scripts/publish/publish-build-artifacts.sh @@ -68,10 +68,10 @@ function publishRepo { # Publish all individual packages from packages-dist. function publishPackages { - PKGS_DIST=dist/packages-dist - if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then - PKGS_DIST=dist/packages-dist-es2015 - fi + GIT_SCHEME=$1 + PKGS_DIST=$2 + BRANCH=$3 + for dir in $PKGS_DIST/*/ dist/tools/@angular/tsc-wrapped do COMPONENT="$(basename ${dir})" @@ -80,12 +80,12 @@ function publishPackages { COMPONENT="${COMPONENT//_/-}" JS_BUILD_ARTIFACTS_DIR="${dir}" - if [[ "$1" == "ssh" ]]; then + if [[ "$GIT_SCHEME" == "ssh" ]]; then 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" 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 SHA=`git rev-parse HEAD` SHORT_SHA=`git rev-parse --short HEAD` @@ -101,16 +101,24 @@ function publishPackages { } # 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 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 [[ \ "$TRAVIS_REPO_SLUG" == "angular/angular" && \ "$TRAVIS_PULL_REQUEST" == "false" && \ "$CI_MODE" == "e2e" ]]; then 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 - 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