gbump

Crates.iogbump
lib.rsgbump
version1.3.0
created_at2019-11-14 22:11:43.754314+00
updated_at2025-12-08 19:38:58.595624+00
descriptionGit tag semantic version bumper
homepagehttps://github.com/nbari/gbump
repositoryhttps://github.com/nbari/gbump
max_upload_size
id181340
size70,447
(nbari)

documentation

https://crates.io/crates/gbump

README

gbump

Git tag semantic version bumper

crates.io Test & Build codecov

What does it do?

gbump scans all git tags, finds the highest SemVer value (including prerelease/build metadata), prints the current version, and shows the bumped value that would be created next. The tool understands the standard major, minor, and patch increments and can optionally create the annotated tag for you.

How to use it?

To install:

cargo install gbump

You can copy gbump to /usr/local/bin/gbump or somewhere available in your path

For usage type:

$ gbump -h

SemVer options are: patch, minor, major. (defaults to patch)

For example if current version tag is 0.1.1:

Using patch will bump 0.1.1 to 0.1.2

$ gbump patch
0.1.1 --> 0.1.2

Using minor will bump 0.1.1 to 0.2.0

$ gbump minor
0.1.1 --> 0.2.0

Using major will bump 0.1.1 to 1.0.0

$ gbump major
0.1.1 --> 1.0.0

Quiet mode

If only need the next semver, use option -q. for example:

$ gbump -q major
1.0.0

--tag (git tag -a X.Y.Z -m "X.Y.Z")

To create a git tag using the latest bump use the flag -t:

 $ gbump -t minor
 Tag: 0.2.0 created: 5b1eca044a538fd2f74c4f043f28ca4a46b8f7b7

--tag-signed / -ts (git tag -s X.Y.Z -m "X.Y.Z")

Use -ts to create a GPG-signed tag instead of the default annotated tag:

 $ gbump -ts patch
 Tag: 0.0.1 created: <oid>

The command shells out to git tag -s, so make sure your signing key and gpg.program are configured in the repository or environment.

Environment variables

  • GBUMP_FORCE_TAG_FAILURE=1 — forces the internal tag lookup to fail. This is mainly useful for tests or CI workflows where you want to confirm the error path.
Commit count: 68

cargo fmt