build: add release helper scripts (#22378)

PR Close #22378
This commit is contained in:
Victor Berchet 2018-02-22 12:07:17 -08:00
parent b2f366b3b7
commit f791862e52
8 changed files with 58 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
set -u -e -o pipefail set -u -e -o pipefail

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
set -u -e -o pipefail set -u -e -o pipefail

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
set -u -e -o pipefail set -u -e -o pipefail

16
scripts/release/post-check Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# use for PATCH releases
# Verify that all packages are published with correct version:
mkdir tmp
cd tmp
npm init -y
npm install typescript@2.6 rxjs@5.5.0 zone.js@0.8.10 @angular/{animations,core,common,forms,router,platform-browser,platform-browser-dynamic,platform-webworker,platform-webworker-dynamic,platform-server,service-worker,compiler,compiler-cli,upgrade,language-service} --save
cd ..
rm -rf tmp
echo "CHECK THE DIST-TAGS"
grep '"name": "@angular' $(find packages -name package.json) | grep -o '@angular/[^/"]*' | sort -u | xargs -n 1 -I% npm show \% name dist-tags

16
scripts/release/post-check-next Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# use for BETA and RC releases
# Verify that all packages are published with correct version:
mkdir tmp
cd tmp
npm init -y
npm install typescript@2.6 rxjs@5.5.0 zone.js@0.8.10 @angular/{animations,core,common,forms,router,platform-browser,platform-browser-dynamic,platform-webworker,platform-webworker-dynamic,platform-server,compiler,compiler-cli,language-service,service-worker,upgrade}@next --save
cd ..
rm -rf tmp
echo "CHECK THE DIST-TAGS"
grep '"name": "@angular' $(find packages -name package.json) | grep -o '@angular/[^/"]*' | sort -u | xargs -n 1 -I% npm show \% name dist-tags

11
scripts/release/pre-check Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Verify peer deps constraints and package.json before publishing to npm
# There should be no npm errors
mkdir tmp
cd tmp
npm init -y
npm install --save ../dist/packages-dist/* zone.js@0.8.10 rxjs@5.5.0 typescript@2.6
cd ..
rm -rf ./tmp

6
scripts/release/publish Executable file
View File

@ -0,0 +1,6 @@
#!/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)

6
scripts/release/publish-next Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Use for BETA and RC releases
# Publish all packages in `dist/packages-dist` to npm (as next)
(cd dist/packages-dist; for p in `ls .`; do npm publish --access public --tag next $p; done)