Skip to content

Instantly share code, notes, and snippets.

@hai5nguy
Created January 7, 2016 18:25
Show Gist options
  • Save hai5nguy/839e9abd63bc38312f80 to your computer and use it in GitHub Desktop.
Save hai5nguy/839e9abd63bc38312f80 to your computer and use it in GitHub Desktop.
greleasethehounds ()
{
if [[ $# == 0 ]]; then
echo "usage: greleasethehounds <version number> [message]"
echo " <version number> - (required) Ex: 1.0.1, 9.9.9, 0.0.3"
echo " The version number."
echo " [message] - (optional) Ex: \"Release 1.0.0, woot, out of beta\""
echo " The commit message and tag message."
echo " Default is \"Release <version number>\"."
echo ""
echo "This function does:"
echo " git add --all"
echo " git commit -m [message]"
echo " git push upstream master"
echo " git tag -a $1 -m [message]"
echo " git push upstream <version number>"
echo ""
return
fi
git branch
read -p "Are you on the master and have the latest? (y/n) " -e yn
if [ $yn != 'y' ]; then
return
fi
read -p "Did you npm and bower? (y/n)" -e yn
if [ $yn != 'y' ]; then
return
fi
read -p "Did you bump version and grunt? (y/n)" -e yn
if [ $yn != 'y' ]; then
return
fi
if [[ $# == 2 ]]; then
message="$2"
else
message="Release $1"
fi
git add --all
git commit -m "$message"
git push upstream master
git tag -a $1 -m "$message"
git push upstream $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment