Skip to content

Commit f88232b

Browse files
committed
use release script to avoid mess ups...
1 parent 8dbc39a commit f88232b

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

build/release.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
set -e
2+
echo "Enter release version: "
3+
read VERSION
4+
5+
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6+
echo # (optional) move to a new line
7+
if [[ $REPLY =~ ^[Yy]$ ]]
8+
then
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
26+
fi

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"e2e": "casperjs test --concise ./test/e2e",
2121
"test": "eslint src && npm run unit && npm run build-examples && npm run e2e",
2222
"docs": "cd docs && gitbook serve",
23-
"deploy-docs": "cd docs && ./deploy.sh",
24-
"prepublish": "npm run build"
23+
"deploy-docs": "cd docs && ./deploy.sh"
2524
},
2625
"repository": {
2726
"type": "git",

0 commit comments

Comments
 (0)