fork-openpgpjs/release.sh
Daniel Huigens 01b077e59c Don't use sed to edit gitignore in release.sh
sed -i is not cross-platform.
2019-11-18 19:45:03 +01:00

35 lines
517 B
Bash
Executable File

#!/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
npm run build
grunt test
# Add build files to git
git add --force dist/ bower.json npm-shrinkwrap.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