build: replace the old publish script with a new bazel-based one
This commit is contained in:
parent
5e307d5ba7
commit
4ecae6449e
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Use for PATCH releases
|
||||
# Publish all packages in `dist/packages-dist` to npm
|
||||
|
||||
(cd dist/packages-dist; for p in `ls .`; do npm publish --access public $p; done)
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
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)
|
||||
|
||||
# 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", //packages/...)'`
|
||||
# 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 latest
|
||||
done
|
||||
|
Loading…
Reference in New Issue