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 | ```
|
8 | npm i -g ver
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 | ```
|
13 | usage: 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 handle. Default is the nearest package.json which if
|
24 | present, will always be included.
|
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 | -g, --no-git Do not create a git commit and tag
|
31 | -p, --prefix Prefix git tags with a "v" character
|
32 | -v, --version Print the version
|
33 | -h, --help Print this help
|
34 |
|
35 | Examples:
|
36 | $ ver patch
|
37 | $ ver -g minor build.js
|
38 | $ ver -p major build.js
|
39 | $ ver patch -c 'npm run build'
|
40 | ```
|
41 |
|
42 | ## Signing commits and tags
|
43 |
|
44 | To automatically sign commits and tags created by `ver` with GPG add this to your `~/.gitconfig`:
|
45 |
|
46 | ``` ini
|
47 | [user]
|
48 | signingkey = <keyid>
|
49 | [commit]
|
50 | gpgsign = true
|
51 | [tag]
|
52 | forceSignAnnotated = true
|
53 | ```
|
54 |
|
55 | © [silverwind](https://github.com/silverwind), distributed under BSD licence
|