#!/bin/bash<<USAGENB - this code has not been tested out of contextUSAGE./release.sh <version>
eg.
./release.sh 1.2.3
This was extracted from a much larger/longer release script.
The real script has some confirmation prompts; and a few
things are handled before this part runs:
* starts on updated master branch
* npm install has already been run
* test suite has already been run
USAGE
VERSION=$1echo"Create working branch for $VERSION"git checkout -b "$VERSION"echo"Create NPM shrinkwrap file"npm prune
npm shrinkwrap --dev
git add npm-shrinkwrap.json -f
echo"Tag and push release"git tag -a "$VERSION" -m "Version: $VERSION"git push origin tags/"$VERSION"
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.