Skip to content

Commit 91cb7f7

Browse files
committed
fix(other): Improve release script
1 parent 4fdcfe1 commit 91cb7f7

2 files changed

Lines changed: 23 additions & 7 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"demo:build:prod": "yarn demo:build --prod",
1212
"demo:serve": "ng serve ngqp-demo",
1313
"schematics:build": "scripts/build-schematics.sh",
14-
"changelog:build": "cd projects/ngqp/core && standard-version --infile ../../../CHANGELOG.md",
1514
"release": "scripts/release.sh",
1615

1716
"//publish:demo": "yarn build:core && ng build ngqp-demo --prod --base-href=\"https://Airblader.github.io/ngqp/\" && npx ngh --dir=dist/ngqp-demo"

scripts/release.sh

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
#!/usr/bin/env bash
2-
# TODO: Copy README
2+
# TODO: Copy README, LICENSE
3+
# TODO: Update website
4+
# TODO: --dry-run (changelog, no publish)
35

4-
yarn run lint || exit 1
6+
# If any command fails, stop immediately
7+
set -e -o pipefail
58

9+
echo "[1] Linting"
10+
yarn run lint
11+
12+
echo "[2] Removing dist folder"
613
rm -rf dist/
7-
yarn run changelog:build || exit 1
8-
yarn run core:build || exit 1
9-
yarn run schematics:build || exit 1
1014

11-
cd dist/ngqp/core && npm publish
15+
echo "[3] Updating CHANGELOG"
16+
cd projects/ngqp/core && standard-version --infile ../../../CHANGELOG.md && cd -
17+
18+
echo "[4] Building @ngqp/core"
19+
yarn run core:build
20+
21+
echo "[5] Building schematics"
22+
yarn run schematics:build
23+
24+
echo "[6] Pushing to remote"
25+
git push
26+
27+
echo "[7] Publishing to npm"
28+
cd dist/ngqp/core && npm publish --access public && cd -

0 commit comments

Comments
 (0)