diff --git a/package.json b/package.json index 78809902..b5a8c3e0 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,10 @@ "browsertest": "npm start -- -o test/unittests.html", "coverage": "nyc npm test", "lint": "eslint 'src/**/*.js' 'test/crypto/**/*.js'", - "docs": "jsdoc --configure .jsdocrc.js --destination docs --recurse README.md src" + "docs": "jsdoc --configure .jsdocrc.js --destination docs --recurse README.md src", + "preversion": "rm -rf dist docs node_modules && npm install && npm test", + "version": "npm run docs && git add -A docs", + "postversion": "git push && git push --tags && npm publish" }, "devDependencies": { "@mattiasbuelens/web-streams-adapter": "0.1.0-alpha.5", diff --git a/release.sh b/release.sh deleted file mode 100755 index f282d14f..00000000 --- a/release.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# abort if tests fail -set -e - -# go to root -cd `dirname $0` - -if [ "$#" -ne 1 ] ; then - echo 'Usage: ./release.sh 0.0.0' - exit 0 -fi - -# install dependencies -rm -rf node_modules -npm install - -# set version -grunt set_version --release=$1 - -# build and test -rm -rf dist -rm -f browserify-cache* -npm run build -grunt test - -# Add build files to git -git add --force dist/ bower.json package-lock.json package.json -git commit -m "Release new version" -git tag v$1 -git push -git push --tag - -# publish to npm -npm publish #--tag old-version