-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
33 lines (27 loc) · 667 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
set -e
echo "Enter release version: "
read VERSION
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Releasing $VERSION ..."
# lint and test
npm run lint 2>/dev/null
npm run unit 2>/dev/null
npm run cover 2>/dev/null
# build
VERSION=$VERSION npm run build
# e2e
npm run e2e 2>/dev/null
# sauce
npm run sauce-all 2>/dev/null
# commit
git add -A
git commit -m "[build] $VERSION"
npm version $VERSION --message "[release] $VERSION"
# publish
git push origin refs/tags/v$VERSION
git push
npm publish
fi