Skip to content

Commit 5cd36c7

Browse files
committed
build: improve the publish-next script (angular#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 angular#23206
1 parent f3d2623 commit 5cd36c7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

scripts/release/publish-next

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ set -u -e -o pipefail
55
# Use for BETA and RC releases
66
# Query Bazel for npm_package and ng_package rules with tags=["release-with-framework"]
77
# Publish them to npm (tagged next)
8-
for p in $(bazel query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //...) intersect kind(".*_package", //...) except //dist/...'); do
9-
bazel run -- $p.publish --access public --tag next
8+
9+
# query for all npm packages to be released as part of the framework release
10+
NPM_PACKAGE_LABELS=`bazel query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //packages/...) intersect kind(".*_package", //...)'`
11+
# build all npm packages in parallel
12+
bazel build $NPM_PACKAGE_LABELS
13+
# publish all packages in sequence to make it easier to spot any errors or warnings
14+
for packageLabel in $NPM_PACKAGE_LABELS; do
15+
echo "publishing $packageLabel"
16+
bazel run -- ${packageLabel}.publish --access public --tag next
1017
done

0 commit comments

Comments
 (0)