diff options
| author | Max Resnick <max@ofmax.li> | 2024-04-13 23:54:49 -0700 |
|---|---|---|
| committer | Max Resnick <max@ofmax.li> | 2024-04-13 23:54:49 -0700 |
| commit | a303fdfd413a316c6934b837ab1c5e222722c0e8 (patch) | |
| tree | ed744c0a9489aa7a8327455c7b9c472b26c34e16 /README.md | |
| parent | dd8b5e9750e8c075816f1bfdc84a6e44724fae12 (diff) | |
| download | go-bumpver-0.2.0.tar.gz | |
feat: add switch to print prior version0.2.0
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -7,7 +7,7 @@ bumpver - print the next semantec version in a given sequence ## Usage ```bash -bumpver part [major|minor|patch] [flags] file [-|file] +bumpver part [major|minor|patch] [flags] file [-|file] ``` ## Why? @@ -20,9 +20,7 @@ bumpver part [major|minor|patch] [flags] file [-|file] ## 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. - -`go-bumpver` has simple but ability to bump pre-release tags using simple formating string. +`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. It also has the ability to bump pre-release tags using simple formating string. ### Inputs @@ -51,7 +49,9 @@ bumpver part [major|minor|patch] [flags] file [-|file] 3.3.4 ``` -**bump tags released on a branch** +**bump tags released along a branch** + +This example supports software that has support for multiple versions at once. E.g. version 2.X is still supported but 3.X is based off of main. ```bash ❯ bumpver patch <(git tag --merged <release branch name>) 2.1.4 @@ -77,6 +77,17 @@ bumpver part [major|minor|patch] [flags] file [-|file] 4.0.0 ``` +***prior version*** +Getting the last version could be useful for generating diffs, release notes etc. + +``` +❯ bumpver major --last-version <(git tag -l) +3.8.1 +❯ bumpver major <(git tag -l) +4.0.0 +``` + + ### Pre-release Pre-releases can be formatted in a way that can be easily bumped. Providing `--prerelease` will generate a new prerelease for the given bump. Meaning if you use `major --prerelease` with the last version 1.2.2 will give `2.0.0-RC.0`. |