UNPKG

1.92 kBMarkdownView Raw
1# package-version-git-tag
2
3[![npm package](https://img.shields.io/npm/v/package-version-git-tag.svg)][npm]
4[![GitHub License](https://img.shields.io/github/license/sounisi5011/package-version-git-tag.svg)][github-license]
5![](https://img.shields.io/node/v/package-version-git-tag.svg)
6[![Dependencies Status](https://david-dm.org/sounisi5011/package-version-git-tag/status.svg)](https://david-dm.org/sounisi5011/package-version-git-tag)
7[![Build Status](https://travis-ci.com/sounisi5011/package-version-git-tag.svg?branch=master)](https://travis-ci.com/sounisi5011/package-version-git-tag)
8[![Maintainability Status](https://api.codeclimate.com/v1/badges/ac675a219746d53b79bc/maintainability)](https://codeclimate.com/github/sounisi5011/package-version-git-tag/maintainability)
9
10[npm]: https://www.npmjs.com/package/package-version-git-tag
11[github-license]: https://github.com/sounisi5011/package-version-git-tag/blob/master/LICENSE
12
13Add Git tag corresponding to the `version` field of `package.json`.
14
15## Install
16
17```sh
18npm install package-version-git-tag
19```
20
21## Usage
22
23For example, suppose that `package.json` exists in the current directory, and version is `1.2.3`:
24
25```json
26{
27 "name": "my-awesome-package",
28 "version": "1.2.3",
29 ...
30}
31```
32
33In this case, this command is:
34
35```sh
36package-version-git-tag
37```
38
39Equivalent to this operation:
40
41```console
42$ git tag v1.2.3
43```
44
45If you add the `--push` flag, it will also run `git push`. That is, this command is:
46
47```sh
48package-version-git-tag --push
49```
50
51Equivalent to this operation:
52
53```console
54$ git tag v1.2.3
55$ git push origin v1.2.3
56```
57
58## Tests
59
60To run the test suite, first install the dependencies, then run `npm test`:
61
62```sh
63npm install
64npm test
65```
66
67## Contributing
68
69see [CONTRIBUTING.md](https://github.com/sounisi5011/package-version-git-tag/blob/master/CONTRIBUTING.md)
70
71## Related
72
73* [taggit](https://github.com/okunishinishi/node-taggit)