README
ver
Semantically increment a project's version in multiple files
Installation
npm i -g ver
Usage
usage: ver [options] command [files...]
Semantically increment a project's version in multiple files.
Commands:
patch Increment patch 0.0.x version
minor Increment minor 0.x.0 version
major Increment major x.0.0 version
Arguments:
files Files to do version replacement in. The nearest package.json and
package-lock.json will always be included unless the -P argument is given
Options:
-b, --base <version> Base version to use. Default is parsed from the nearest package.json
-c, --command <command> Run a command after files are updated but before git commit and tag
-d, --date [<date>] Replace dates in format YYYY-MM-DD with current or given date
-r, --replace <str> Additional replacement in the format "s#regexp#replacement#flags"
-P, --packageless Do not include package.json and package-lock.json unless explicitely given
-g, --gitless Do not create a git commit and tag
-p, --prefix Prefix git tags with a "v" character
-m, --message <str> Custom tag and commit message, can be given multiple times. The token
_VER_ is available in these messages to fill in the new version
-C, --changelog Generate a changelog since the base version tag or if absent, the latest
tag, which will be appended to the tag and commit messages
-v, --version Print the version
-h, --help Print this help
Examples:
$ ver patch
$ ver minor build.js
$ ver major -p build.js
$ ver patch -c 'npm run build'
$ ver patch -C -m '_VER_' -m 'This is a great release'
Signing commits and tags
To automatically sign commits and tags created by ver
with GPG add this to your ~/.gitconfig
:
[user]
signingkey = <keyid>
[commit]
gpgsign = true
[tag]
forceSignAnnotated = true
© silverwind, distributed under BSD licence