diff --git a/build/release.sh b/build/release.sh index c86396bda..eb460af3b 100644 --- a/build/release.sh +++ b/build/release.sh @@ -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 diff --git a/package.json b/package.json index f7554727b..93a37b303 100644 --- a/package.json +++ b/package.json @@ -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",