From 5cd36c7764c08ddcdd410281a2c914194ca0d3ae Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 5 Apr 2018 13:01:25 -0700 Subject: [PATCH] build: improve the publish-next script (#23206) - add paralelization of the build - correct issues with picking up targets from /dist and /aio/node_modules/ - add logging during the publish process PR Close #23206 --- scripts/release/publish-next | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/release/publish-next b/scripts/release/publish-next index de02019a6e..10486c8412 100755 --- a/scripts/release/publish-next +++ b/scripts/release/publish-next @@ -5,6 +5,13 @@ set -u -e -o pipefail # Use for BETA and RC releases # Query Bazel for npm_package and ng_package rules with tags=["release-with-framework"] # Publish them to npm (tagged next) -for p in $(bazel query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //...) intersect kind(".*_package", //...) except //dist/...'); do - bazel run -- $p.publish --access public --tag next + +# query for all npm packages to be released as part of the framework release +NPM_PACKAGE_LABELS=`bazel query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //packages/...) intersect kind(".*_package", //...)'` +# build all npm packages in parallel +bazel build $NPM_PACKAGE_LABELS +# publish all packages in sequence to make it easier to spot any errors or warnings +for packageLabel in $NPM_PACKAGE_LABELS; do + echo "publishing $packageLabel" + bazel run -- ${packageLabel}.publish --access public --tag next done