#!/bin/bash<<NOTESNB - this code has not been tested out of contextUSAGE./release.sh <version>eg../release.sh 1.2.3This was extracted from a much larger/longer release script.The real script has some confirmation prompts; and a fewthings are handled before this part runs:* starts on updated master branch* npm install has already been run* test suite has already been runNOTESVERSION=$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"
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.