UNPKG

525 Bapplication/x-shView Raw
1set -e
2echo "Enter release version: "
3read VERSION
4
5read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6echo # (optional) move to a new line
7if [[ $REPLY =~ ^[Yy]$ ]]
8then
9 echo "Releasing $VERSION ..."
10
11 # run tests
12 # npm test 2>/dev/null
13
14 # build
15 # VERSION=$VERSION npm run build
16
17 # commit
18 # git add -A
19 # git commit -m "[build] $VERSION"
20 npm version $VERSION --message "[release] $VERSION"
21
22 # # publish
23 git push origin refs/tags/v$VERSION
24 git push
25 npm publish
26fi