Skip to content

Pre-commit hook to align the pyproject.toml version with the latest tag in the repo

Notifications You must be signed in to change notification settings

eshwen/pyproject-version-sync

Repository files navigation

pyproject-version-sync

Python 3.10 Poetry pre-commit

Pre-commit hook to sync the pyproject.toml version to the latest tag in the repo.

Usage

To flag whether the latest tag in the repo matches the version in the pyproject.toml file, add the following to your .pre-commit-config.yaml:

  - repo: https://github.com/eshwen/pyproject-version-sync
    rev: v0.2.1
    hooks:
      - id: pyproject-version-sync

Or, to enable autofix:

  - repo: https://github.com/eshwen/pyproject-version-sync
    rev: v0.2.1
    hooks:
      - id: pyproject-version-sync
        args: [--fix]

Examples

With the default arguments:

default

With autofix:

fix

(Styling shamelessly nicked from https://github.com/ines/termynal. Check out that repo for cool terminal animations!)

About

Pre-commit hook to align the pyproject.toml version with the latest tag in the repo

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages