Skip to content

Commit d5fdaea

Browse files
committed
release script
1 parent a85c19a commit d5fdaea

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

build/release.sh

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
66
echo # (optional) move to a new line
77
if [[ $REPLY =~ ^[Yy]$ ]]
88
then
9-
echo "Releasing $VERSION ..."
9+
echo "Releasing $VERSION ..."
1010

11-
# run tests
12-
npm test 2>/dev/null
11+
# run tests
12+
npm test 2>/dev/null
1313

14-
# build
15-
VERSION=$VERSION npm run build
14+
# build
15+
VERSION=$VERSION npm run build
1616

17-
# # commit
18-
git add -A
19-
git commit -m "[build] $VERSION"
20-
npm version $VERSION --message "[release] $VERSION"
17+
# commit
18+
git add -A
19+
git commit -m "[build] $VERSION"
20+
npm version $VERSION --message "[release] $VERSION"
2121

22-
# # publish
23-
git push origin refs/tags/v$VERSION
24-
git push
25-
npm publish
22+
# publish
23+
git push origin refs/tags/v$VERSION
24+
git push
25+
npm publish
2626
fi

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
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"
23+
"deploy-docs": "cd docs && ./deploy.sh",
24+
"release": "bash build/release.sh"
2425
},
2526
"repository": {
2627
"type": "git",

0 commit comments

Comments
 (0)