ci: don't publish ivy build artifacts on a non-master branch

This commit is contained in:
Igor Minar 2018-10-23 14:43:17 -07:00 committed by Alex Rickabaugh
parent ce6948fc1b
commit 07b89902d5
2 changed files with 6 additions and 1 deletions

View File

@ -59,6 +59,7 @@ buildTargetPackages "$BAZEL_TARGETS" "dist/packages-dist" "legacy" "Production"
[[ "${CI_PULL_REQUEST-}" != "false"
|| "${CI_REPO_OWNER-}" != "angular"
|| "${CI_REPO_NAME-}" != "angular"
|| "${CI_BRANCH}" != "master"
]] && exit 0
buildTargetPackages "$BAZEL_TARGETS" "dist/packages-dist-ivy-aot" "aot" "Ivy AOT"

View File

@ -123,7 +123,11 @@ function publishAllBuilds() {
local latestTag=`getLatestTag`
publishPackages $GIT_SCHEME dist/packages-dist $CUR_BRANCH "${latestTag}+${shortSha}"
publishPackages $GIT_SCHEME dist/packages-dist-ivy-aot "${CUR_BRANCH}-ivy-aot" "${latestTag}-ivy-aot+${shortSha}"
# don't publish ivy builds on non-master branch
if [[ "${CI_BRANCH-}" == "master" ]]; then
publishPackages $GIT_SCHEME dist/packages-dist-ivy-aot "${CUR_BRANCH}-ivy-aot" "${latestTag}-ivy-aot+${shortSha}"
fi
}
# See docs/DEVELOPER.md for help