tagver
semver tagging control for git
tagver gets/sets git version tags, using semantic versioning (semver).
By default, tagver will bump, tag and push updated version tags to the git repository.
Node API
tagver.version([options])
Gets the current highest semver version tag from git
returns: Promise
tagverversion;
options
cwd: './' // Directory which tagver should use for git commandsfilter: '*' // Semver filter to use. This will return the highest version based on the filter.
tagver.bump(input[, options])
Bumps the version based on the input.
Input can be a valid semver version number, or, release type.
returns: Promise
tagver;tagver;tagver;tagver;
options
cwd: './' // Directory which tagver should use for git commandstag: true // Should tagver store a git tag?publish: true // Should tagver publish new tags to the remote?message: 'Release v%s' // Custom tag message. %s will be replaced with the version numberbase: '0.0.0' // Initial version to increment when no version is foundfilter: '*' // Semver filter to use. This will return the highest version based on the filter.
Cli Usage
$ npm i -g tagver
tagver
Returns the current highest semver version tag from git
$ git tagtest-tagv0.1.0v0.1.1v0.1.10v0.1.11$ tagver0.1.11
tagver x.x.x
Bumps the version to the one specified
$ tagver 1.2.31.2.3
tagver major
Bumps the major version
$ tagver1.2.3$ tagver major2.0.0
tagver minor
Bumps the minor version
$ tagver1.2.3$ tagver minor1.3.0
tagver patch
Bumps the patch version
$ tagver1.2.3$ tagver patch1.2.4
--message, -m option
Optional message to use for git tags.
%s
will be replaced with the version number.
default: Release v%s
$ tagver patch -m "Auto release package [v%s]"
--base, -b option
Optional version to increment when no version is found.
default: 0.0.0
$ tagver patch -b "1.0.0"
--filter, -f option
Optional semver filter to use. This will return the highest version based on the filter.
default: *
$ tagver1.2.3
$ tagver -f "<1.2.x"1.1.18
--no-git-tag option
Prevents tagver from creating a git tag. This will also prevent any publishing of tags.
$ git tagv1.2.0v1.2.1v1.2.2v1.2.3$ tagver1.2.3$ tagver minor --no-git-tag1.2.4$ git tagv1.2.0v1.2.1v1.2.2v1.2.3
--no-git-publish option
Prevents tagver from publishing created tags.