UNPKG

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