https://github.com/autonomoussoftware/check-tag-matches
Checks if the package.json version matches current tag
https://github.com/autonomoussoftware/check-tag-matches
check git hook javascript tags
Last synced: 11 months ago
JSON representation
Checks if the package.json version matches current tag
- Host: GitHub
- URL: https://github.com/autonomoussoftware/check-tag-matches
- Owner: autonomoussoftware
- License: mit
- Created: 2018-03-13T19:16:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-06T13:50:06.000Z (almost 6 years ago)
- Last Synced: 2025-02-16T23:32:51.065Z (12 months ago)
- Topics: check, git, hook, javascript, tags
- Language: JavaScript
- Size: 38.1 KB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# check-tag-matches
[](https://travis-ci.org/autonomoussoftware/check-tag-matches)
[](https://www.bithound.io/github/autonomoussoftware/check-tag-matches)
[](https://www.bithound.io/github/autonomoussoftware/check-tag-matches)
[](https://github.com/bloq/eslint-config-bloq)
[](https://snyk.io/test/github/autonomoussoftware/check-tag-matches)
Checks if the `package.json` version matches current tag.
The objective of this package and tool is to be used before publishing an NPM package and verify:
- The repository was properly tagged.
- The tag matches the version in the `package.json`.
- The publishing is being done from that exact tagged commit.
## Installation
```bash
$ npm install --save-dev check-tag-matches
```
## Usage
Update the `package.json` scripts to use the check on `prepublishOnly`:
```json
{
"scripts": {
"prepublishOnly": "tag-matches"
}
}
```
## License
[MIT Lincese](https://github.com/autonomoussoftware/check-tag-matches/blob/master/LICENSE)