UNPKG

1.81 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 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 -r, --replace <str> Additional replacement in the format "s#regexp#replacement#flags"
29 -g, --no-git Do not create a git commit and tag
30 -p, --prefix Prefix git tags with a "v" character
31 -v, --version Print the version
32 -h, --help Print this help
33
34 Examples:
35 $ ver patch
36 $ ver -g minor build.js
37 $ ver -p major build.js
38 $ ver patch -c 'npm run build'
39```
40
41## Signing commits and tags
42
43To automatically sign commits and tags created by `ver` with GPG add this to your `~/.gitconfig`:
44
45``` ini
46[user]
47 signingkey = <keyid>
48[commit]
49 gpgsign = true
50[tag]
51 forceSignAnnotated = true
52```
53
54© [silverwind](https://github.com/silverwind), distributed under BSD licence