Skip to content

A tool to manage version-tag with the semantic versioning specification.

License

Notifications You must be signed in to change notification settings

kyoh86/git-vertag

Repository files navigation

git-vertag

A tool to manage version-tag with the semantic versioning specification.

This tool supports only update semantic versioning tags. So it will not delete, replace, or rollback versions.

PkgGoDev Go Report Card Coverage Status Release

Install

go install -v github.com/kyoh86/git-vertag@latest

Usage

git-vertag won't rollback versions. There's some sub commands to manipulate versions.

Sub command Description
get (default) Gets the current version tag.
major Creates a tag for the next major version and prints it.
minor Creates a tag for the next minor version and prints it.
patch Creates a tag for the next patch version and prints it.
pre Creates a tag for the next pre-release version and prints it.
build Creates a tag for the next build version and prints it.

See git vertag --help-long for detail.

Example

Case 1: Update major

$ git vertag
v1.2.3
$ git vertag major
v2.0.0

Case 2: Update minor with messages

$ git vertag
v1.2.3
$ git vertag minor --message 'Supports new notation'
v1.3.0-alpha.2

Case 3: Update patch with pre-release meta informations

$ git vertag
v1.2.3
$ git vertag patch --pre alpha --pre 2
v1.2.4-alpha.2

Case 4: Release current patch that has pre-released.

$ git vertag
v1.2.4-alpha.2
$ git vertag release
v1.2.4

LICENSE

MIT License

This is distributed under the MIT License.