This gist describes tagging in git
Create a new annotated tag identified with "v1.0.0":
$ git tag -a v1.0.0Create a new annotated tag identified with "v1.0.0", along with an inline message:
$ git tag - a v1.0.0 -m "My release message"Create a new lightweight tag:
$ git tag v1.0.0By default, git push does not push tags to the remote server. Explicitly push a tag version with git push origin <tag name> or push all tag versions with git push origin --tags.
| Command | Description |
|---|---|
git tag |
List all existing tags |
git tag -l 'v1.*.*' |
List all existing tags matching v1.x.x |
git tag -l -n3 |
List all existing tags along with their contents |
git show <tag identifier> |
Displays details of a tag by its identifier |
Documentation link: here
Running npm version <update-type> does 2 things:
- Bump the
versionfield inpackage.jsonas specified by<update-type> - Create a version commit and tag as controlled by
git-tag-version. This behaviour can be disabled with the--no-git-tag-versionflag.
A version message can be appended using npm version <update-type> -m "Update to %s for reasons"
There are 3 hooks that, if defined in package.json, will be executed as part of running npm version:
preversion(runs beforenpm version)version(runs after theversionfield is updated)postversion(runs after theversionscript)