diff --git a/scripts/release/publish b/scripts/release/publish deleted file mode 100755 index 204be53eee..0000000000 --- a/scripts/release/publish +++ /dev/null @@ -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) \ No newline at end of file diff --git a/scripts/release/publish-latest b/scripts/release/publish-latest new file mode 100755 index 0000000000..58842dd910 --- /dev/null +++ b/scripts/release/publish-latest @@ -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 +