# go-bumpver _Inspired by the python bump2version tool._ bumpver - next semantec version in a given sequence ## Usage ``` bumpver part [major|minor|patch] file [-|file] [flags] ``` ## Why? - Most version bumpers are fairly tightly coupled to git. - Most like to make commits for you - Few seem to have useful pre release mechanisms - None seem to provide simple interfaces - Lack of unix philosophy Many tools touch git and some opinionatedly like to touch it. ## How? `go-bumpver` takes the sequence of version(s) from a file or stdin and prints the next version. It drops invalid versions in the sequence and only uses valid ones. It does not make a tag or change any state in git or any other VCS it only prints the next version. ### Inputs *stdin* ``` ❯ echo "1.1.1\n1.2.1" | bumpver patch - 1.2.2% ``` *file* ``` ❯ echo v0.1.0 > VERSION ❯ bumpver patch VERSION 0.1.1% ``` *local repo* ``` ❯ bumpver patch <(git tag -l) 3.3.2% ``` *remote repo* ``` ❯ bumpver patch <(git ls-remote --tags --refs origin v\* | awk -F'[ /]' '{ print $NF }') 3.3.4% ``` ### Bumps *a patch* ``` ❯ bumpver patch <(git tag -l) 3.3.2% ``` *a minor* ``` ❯ bumpver minor <(git tag -l) 3.4.0% ``` *a major* ``` ❯ bumpver major <(git tag -l) 4.0.0% ```