Created
March 7, 2014 17:18
-
-
Save mogelbrod/9415704 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gbump () { | |
what=${1:-patch} | |
echo "Bumping $what version and pushing to origin" | |
changed=$(git diff-index --name-only HEAD --) | |
[ -n "$changed" ] && git stash | |
git pull --rebase && npm version $what && git push && git push --tags | |
[ -n "$changed" ] && git stash pop | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment