Verify version in pyproject.toml is not already used
Project description
pyproject-tag-check
I always forget to bump poetry version in pyproject.toml files. That's why I build this simple package. It is pre-commit hook which check that version in pyproject.toml is not used as a tag for given repo URL (must be public repository).
Usage:
Put it in .pre-commit.config.yaml
repos and argument must be URL to public repo on GH (for example this repo itself https://github.com/rafsaf/pyproject-tag-check).
repos:
- repo: https://github.com/rafsaf/pyproject-tag-check
rev: "1.0.0"
hooks:
- id: pyproject-tag-check
always_run: true
args:
- https://github.com/rafsaf/pyproject-tag-check
Use always_run: true
if check should be performed always, otherwise it will run only when pyproject.toml
is changed.
pyproject.toml
usually looks like
[tool.poetry]
name = "some-name..."
version = "0.1.0"
If repository is public and tag 0.1.0 already exists like it does for https://github.com/rafsaf/pyproject-tag-check, the check will not pass.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyproject_tag_check-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8a20409180cfd68504749830bdeb74066c5d69d5ec396329f3bf9963b4ee256 |
|
MD5 | 71b823ee3af5e3c2e5588afab5888833 |
|
BLAKE2b-256 | 0f4d75437fa251643dd532d3bb33439b50a6c3b6d57a3fb1269426785438bca5 |
Hashes for pyproject_tag_check-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1679efe6a4ec91ce9fdfa881288c016d6c479f21e3b02d2c5b04ccdc6605062 |
|
MD5 | 72ef17e08737676ec2540569c4a4014c |
|
BLAKE2b-256 | 9989605fbc938fbbddaec98ade2e970c3f9f64185454d746fe4e65a37764f14a |