Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Created December 17, 2015 12:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahemoff/1b6c26fa9c474f4515aa to your computer and use it in GitHub Desktop.
Save mahemoff/1b6c26fa9c474f4515aa to your computer and use it in GitHub Desktop.
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