UNPKG

2.05 kBMarkdownView Raw
1# ver
2[![](https://img.shields.io/npm/v/ver.svg?style=flat)](https://www.npmjs.org/package/ver) [![](https://img.shields.io/npm/dm/ver.svg)](https://www.npmjs.org/package/ver) [![](https://api.travis-ci.org/silverwind/ver.svg?style=flat)](https://travis-ci.org/silverwind/ver)
3
4> Semantically increment a project's version in multiple files
5
6## Installation
7```
8npm i -g ver
9```
10
11## Usage
12```
13usage: ver [options] command [files...]
14
15 Semantically increment a project's version in multiple files.
16
17 Commands:
18 patch Increment patch 0.0.x version
19 minor Increment minor 0.x.0 version
20 major Increment major x.0.0 version
21
22 Arguments:
23 files Files to do version replacement in. The nearest package.json and
24 package-lock.json will always be included unless the -P argument is given.
25 Options:
26 -b, --base <version> Base version to use. Default is parsed from the nearest package.json
27 -c, --command <command> Run a command after files are updated but before git commit and tag
28 -d, --date [<date>] Replace dates in format YYYY-MM-DD with current or given date
29 -r, --replace <str> Additional replacement in the format "s#regexp#replacement#flags"
30 -P, --packageless Do not include package.json and package-lock.json unless explicitely given
31 -g, --gitless Do not create a git commit and tag
32 -p, --prefix Prefix git tags with a "v" character
33 -v, --version Print the version
34 -h, --help Print this help
35
36 Examples:
37 $ ver patch
38 $ ver -g minor build.js
39 $ ver -p major build.js
40 $ ver patch -c 'npm run build'
41```
42
43## Signing commits and tags
44
45To automatically sign commits and tags created by `ver` with GPG add this to your `~/.gitconfig`:
46
47``` ini
48[user]
49 signingkey = <keyid>
50[commit]
51 gpgsign = true
52[tag]
53 forceSignAnnotated = true
54```
55
56© [silverwind](https://github.com/silverwind), distributed under BSD licence