Replace release.sh with npm version
scripts
This commit is contained in:
parent
defa1283cb
commit
ed9a029fcf
|
@ -37,7 +37,10 @@
|
||||||
"browsertest": "npm start -- -o test/unittests.html",
|
"browsertest": "npm start -- -o test/unittests.html",
|
||||||
"coverage": "nyc npm test",
|
"coverage": "nyc npm test",
|
||||||
"lint": "eslint 'src/**/*.js' 'test/crypto/**/*.js'",
|
"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": {
|
"devDependencies": {
|
||||||
"@mattiasbuelens/web-streams-adapter": "0.1.0-alpha.5",
|
"@mattiasbuelens/web-streams-adapter": "0.1.0-alpha.5",
|
||||||
|
|
35
release.sh
35
release.sh
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user