https://github.com/joseph-pq/check-tag-pre-commit
Check latest tag before pushing
https://github.com/joseph-pq/check-tag-pre-commit
git pre-commit-hook python
Last synced: 7 months ago
JSON representation
Check latest tag before pushing
- Host: GitHub
- URL: https://github.com/joseph-pq/check-tag-pre-commit
- Owner: joseph-pq
- Created: 2025-03-25T20:26:27.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-26T13:16:15.000Z (9 months ago)
- Last Synced: 2025-04-03T22:16:52.703Z (9 months ago)
- Topics: git, pre-commit-hook, python
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Check tag pre-commit
This pre-commit hook check, before pushing to git remote, if the latest tag of
your Python project matches the version in the `__version__` attribute of your
package at the time of the commit.
## Installation
Add the following to your `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/joseph-pq/check-tag-pre-commit
rev: # set the version you required
hooks:
- id: check-version-tag
```
## Usage
After installing the hook, you can run it manually with:
```bash
pre-commit run check-version-tag
```