# go-bumpver _Inspired by the python bump2version tool._ bumpver - next semantec version in a given sequence ## Usage ```bash 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** ```bash ❯ echo "1.1.1\n1.2.1" | bumpver patch - 1.2.2% ``` **file** ```bash ❯ echo v0.1.0 > VERSION ❯ bumpver patch VERSION 0.1.1% ``` **local repo** ```bash ❯ bumpver patch <(git tag -l) 3.3.2% ``` **remote repo** ```bash ❯ bumpver patch <(git ls-remote --tags --refs origin v\* | awk -F'[ /]' '{ print $NF }') 3.3.4% ``` ### Bumps **a patch** ```bash ❯ bumpver patch <(git tag -l) 3.3.2% ``` **a minor** ```bash ❯ bumpver minor <(git tag -l) 3.4.0% ``` **a major** ```bash ❯ bumpver major <(git tag -l) 4.0.0% ```