Version: 0.0.10.0.20.0.30.0.40.0.60.0.70.1.00.1.10.1.30.1.40.1.50.1.60.1.70.1.80.1.90.1.100.1.110.1.120.1.130.1.140.1.150.1.160.1.170.1.180.2.00.2.10.2.20.2.30.3.00.4.00.4.10.4.20.4.30.5.30.5.50.5.70.6.00.6.10.6.20.6.30.6.40.6.60.8.00.9.00.11.00.11.10.12.1
#!/bin/bash
version=`cat package.json | grep version | sed -ne 's/^[ ]*"version":[ ]*"\([0-9\.]*\)",$/\1/p'`
read -p "Publish and tag as v$version? " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
npm publish
git tag -a v$version -m "version $version"
git push --tags
fi