Skip to content

Commit

Permalink
build(es2015): fix bad merge of angular#13471
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Jan 19, 2017
1 parent 67dc091 commit d1201a8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions scripts/ci-lite/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
30 changes: 19 additions & 11 deletions scripts/publish/publish-build-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
Expand All @@ -80,12 +80,12 @@ function publishPackages {
COMPONENT="${COMPONENT//_/-}"
JS_BUILD_ARTIFACTS_DIR="${dir}"

if [[ "$1" == "ssh" ]]; then
if [[ "$GIT_SCHEME" == "ssh" ]]; then
REPO_URL="[email protected]:${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`
Expand All @@ -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

0 comments on commit d1201a8

Please sign in to comment.