Skip to content

Contribute

Sergey Vilgelm edited this page May 27, 2019 · 7 revisions

Version Bumping

bump_version.go tool makes it possible to create a new tag with increased minor version and an annotation. Usage: $ go run tools/bump_version.go --help bump_version [options] [version] Options:

-m, --major
    Increase major version
-n, --minor
    Increase minor version
-p, --patch
    Increase patch version
-s, --sign
    Make a GPG-signed tag, using the default e-mail address's key
-r, --dry-run
    Test run, prints an annotation of the tag

Examples:

go run tools/bump_version.go: creates a tag with +1 for minor (v1.0.0 -> v1.1.0)
go run tools/bump_version.go -p: increase patch (v1.0.0 -> v1.0.1), for bug fixes
go run tools/bump_version.go v2.10.4: creates the v2.10.4 tag

The script also generates an annotation with all commits merged since the last tag.

And don't forget to execute:

$ git push origin --tags

Clone this wiki locally