Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/cli/npm-version.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/cli/npm-version.md b/doc/cli/npm-version.md
index 6bd550659..2932516bb 100644
--- a/doc/cli/npm-version.md
+++ b/doc/cli/npm-version.md
@@ -3,7 +3,7 @@ npm-version(1) -- Bump a package version
## SYNOPSIS
- npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
+ npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
'npm [-v | --version]' to print npm version
'npm view <pkg> version' to view a package's published version
@@ -14,10 +14,11 @@ npm-version(1) -- Bump a package version
Run this in a package directory to bump the version and write the new
data back to `package.json` and, if present, `npm-shrinkwrap.json`.
-The `newversion` argument should be a valid semver string, *or* a
-valid second argument to semver.inc (one of `patch`, `minor`, `major`,
-`prepatch`, `preminor`, `premajor`, `prerelease`). In the second case,
+The `newversion` argument should be a valid semver string, a
+valid second argument to [semver.inc](https://github.com/npm/node-semver#functions) (one of `patch`, `minor`, `major`,
+`prepatch`, `preminor`, `premajor`, `prerelease`), or `from-git`. In the second case,
the existing version will be incremented by 1 in the specified field.
+`from-git` will try to read the latest git tag, and use that as the new npm version.
If run in a git repo, it will also create a version commit and tag.
This behavior is controlled by `git-tag-version` (see below), and can