2018-05-11 02:01:22 -04:00
|
|
|
#!/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
|
2018-10-27 03:25:45 -04:00
|
|
|
NPM_PACKAGE_LABELS=`yarn bazel query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //packages/...) intersect kind(".*_package", //packages/...)'`
|
2018-05-11 02:01:22 -04:00
|
|
|
# build all npm packages in parallel
|
2018-10-27 03:25:45 -04:00
|
|
|
yarn bazel build $NPM_PACKAGE_LABELS
|
2018-05-11 02:01:22 -04:00
|
|
|
# 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"
|
2018-10-27 03:25:45 -04:00
|
|
|
yarn bazel run -- ${packageLabel}.publish --access public --tag latest
|
2018-05-11 02:01:22 -04:00
|
|
|
done
|
|
|
|
|