Skip to content

Commit 5a67f4d

Browse files
committed
chore: add release script to server-test-utils
1 parent 167927a commit 5a67f4d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
set -e
2+
3+
if [[ -z $1 ]]; then
4+
echo "Enter new version: "
5+
read VERSION
6+
else
7+
VERSION=$1
8+
fi
9+
10+
read -p "Releasing $VERSION - are you sure? (y/n) " -n 1 -r
11+
echo
12+
if [[ $REPLY =~ ^[Yy]$ ]]; then
13+
echo "Releasing $VERSION ..."
14+
15+
npm run test
16+
17+
# build
18+
npm run build
19+
20+
# commit
21+
git add -A
22+
git add -f \
23+
dist/*.js
24+
git commit -m "build: server-test-utils $VERSION"
25+
npm version $VERSION --message "release: server-test-utils $VERSION"
26+
27+
# publish
28+
git push
29+
npm publish
30+
31+
# generate release note
32+
VERSION=$VERSION npm run release:note
33+
fi

0 commit comments

Comments
 (0)