Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add release helper scripts #22378

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/github/merge-pr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

set -u -e -o pipefail

Expand Down
2 changes: 1 addition & 1 deletion scripts/github/push-upstream
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

set -u -e -o pipefail

Expand Down
2 changes: 1 addition & 1 deletion scripts/github/rebase-pr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

set -u -e -o pipefail

Expand Down
16 changes: 16 additions & 0 deletions scripts/release/post-check
Original file line number Diff line number Diff line change
@@ -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 changes: 16 additions & 0 deletions scripts/release/post-check-next
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions scripts/release/pre-check
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions scripts/release/publish
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions scripts/release/publish-next
Original file line number Diff line number Diff line change
@@ -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)