build(es2015): fix bad merge of #13471 (#14020)

This commit is contained in:
Alex Eagle
2017-01-19 14:25:44 -08:00
committed by Alex Rickabaugh
parent 67dc0912c5
commit 9d8c467cb0
4 changed files with 32 additions and 23 deletions
-5
View File
@@ -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;
+19 -11
View File
@@ -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