Skip to content

Commit

Permalink
release script
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 8, 2016
1 parent a85c19a commit d5fdaea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
26 changes: 13 additions & 13 deletions build/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ 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 ..."
echo "Releasing $VERSION ..."

# run tests
npm test 2>/dev/null
# run tests
npm test 2>/dev/null

# build
VERSION=$VERSION npm run build
# build
VERSION=$VERSION npm run build

# # commit
git add -A
git commit -m "[build] $VERSION"
npm version $VERSION --message "[release] $VERSION"
# 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
# publish
git push origin refs/tags/v$VERSION
git push
npm publish
fi
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"e2e": "casperjs test --concise ./test/e2e",
"test": "eslint src && npm run unit && npm run build-examples && npm run e2e",
"docs": "cd docs && gitbook serve",
"deploy-docs": "cd docs && ./deploy.sh"
"deploy-docs": "cd docs && ./deploy.sh",
"release": "bash build/release.sh"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit d5fdaea

Please sign in to comment.