1
0
Fork 0

Merging upstream version 0.19.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 06:07:32 +01:00
parent 61e6dccee9
commit 2efee3d3ab
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
111 changed files with 2058 additions and 1676 deletions

13
hatch_build.py Normal file
View file

@ -0,0 +1,13 @@
# hatch_build.py is executed by hatch at build-time and can contain custom build logic hooks
import os
from hatchling.metadata.plugin.interface import MetadataHookInterface
class CustomMetadataHook(MetadataHookInterface):
"""Custom metadata hook for hatch that ensures that gitlint and gitlint-core[trusted-deps] versions always match"""
def update(self, metadata: dict) -> None:
# Only enforce versioning matching outside of the 'dev' environment, this allows for re-use of the 'dev'
# environment between different git branches.
if os.environ.get("HATCH_ENV_ACTIVE", "not-dev") != "dev":
metadata["dependencies"] = [f"gitlint-core[trusted-deps]=={metadata['version']}"]