Skip to content

Instantly share code, notes, and snippets.

@mahemoff

mahemoff/semver.sh

Created Dec 17, 2015
Embed
What would you like to do?
Aliases to support semantically-versioned git tags
# First install https://github.com/flazz/semver
# With this script, you can run "vminor add more cowbell" or just "vminor"
function vbump() {
level=$1
semver inc $level
shift
git tag -a $(semver tag) -m "${*:-bump}"
git tag -n9 | grep `git describe` # show annotated
}
function vpatch() { vbump patch $* ; }
function vminor() { vbump minor $* ; }
function vmajor() { vbump major $* ; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment