npm: Upgrade to 1.3.17
[platform/upstream/nodejs.git] / deps / npm / man / man1 / npm-version.1
1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
3 .
4 .TH "NPM\-VERSION" "1" "December 2013" "" ""
5 .
6 .SH "NAME"
7 \fBnpm-version\fR \-\- Bump a package version
8 .
9 .SH "SYNOPSIS"
10 .
11 .nf
12 npm version [<newversion> | major | minor | patch]
13 .
14 .fi
15 .
16 .SH "DESCRIPTION"
17 Run this in a package directory to bump the version and write the new
18 data back to the package\.json file\.
19 .
20 .P
21 The \fBnewversion\fR argument should be a valid semver string, \fIor\fR a valid
22 second argument to semver\.inc (one of "patch", "minor", or
23 "major")\. In the second case, the existing version will be incremented
24 by 1 in the specified field\.
25 .
26 .P
27 If run in a git repo, it will also create a version commit and tag, and
28 fail if the repo is not clean\.
29 .
30 .P
31 If supplied with \fB\-\-message\fR (shorthand: \fB\-m\fR) config option, npm will
32 use it as a commit message when creating a version commit\.  If the \fBmessage\fR config contains \fB%s\fR then that will be replaced with the
33 resulting version number\.  For example:
34 .
35 .IP "" 4
36 .
37 .nf
38 npm version patch \-m "Upgrade to %s for reasons"
39 .
40 .fi
41 .
42 .IP "" 0
43 .
44 .P
45 If the \fBsign\-git\-tag\fR config is set, then the tag will be signed using
46 the \fB\-s\fR flag to git\.  Note that you must have a default GPG key set up
47 in your git config for this to work properly\.  For example:
48 .
49 .IP "" 4
50 .
51 .nf
52 $ npm config set sign\-git\-tag true
53 $ npm version patch
54 You need a passphrase to unlock the secret key for
55 user: "isaacs (http://blog\.izs\.me/) <i@izs\.me>"
56 2048\-bit RSA key, ID 6C481CF6, created 2010\-08\-31
57 Enter passphrase:
58 .
59 .fi
60 .
61 .IP "" 0
62 .
63 .SH "SEE ALSO"
64 .
65 .IP "\(bu" 4
66 npm help init
67 .
68 .IP "\(bu" 4
69 npm help  package\.json
70 .
71 .IP "\(bu" 4
72 npm help  semver
73 .
74 .IP "" 0
75