From b409f3078503b5aee707c26982fa303b670d41cc Mon Sep 17 00:00:00 2001 From: Joris Roovers Date: Fri, 10 Feb 2023 11:44:54 +0000 Subject: Metadata urls to source commit for gitlint-core (#441) This enables traceability from the build to the source code for gitlint-core. --- gitlint-core/pyproject.toml | 14 ++++++++------ pyproject.toml | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gitlint-core/pyproject.toml b/gitlint-core/pyproject.toml index d6f2276..309e76d 100644 --- a/gitlint-core/pyproject.toml +++ b/gitlint-core/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "gitlint-core" -dynamic = ["version"] +dynamic = ["version", "urls"] description = "Git commit message linter written in python, checks your commit messages for style." readme = "README.md" license = "MIT" @@ -49,11 +49,6 @@ trusted-deps = [ [project.scripts] gitlint = "gitlint.cli:cli" -[project.urls] -Documentation = "https://jorisroovers.github.io/gitlint" -Homepage = "https://jorisroovers.github.io/gitlint" -Source = "https://github.com/jorisroovers/gitlint" - [tool.hatch.version] source = "vcs" raw-options = { root = ".." } @@ -66,3 +61,10 @@ include = [ exclude = [ "/gitlint/tests", # ] + +[tool.hatch.metadata.hooks.vcs.urls] +Homepage = "https://jorisroovers.github.io/gitlint" +Documentation = "https://jorisroovers.github.io/gitlint" +Source = "https://github.com/jorisroovers/gitlint/tree/main/gitlint-core" +Changelog = "https://github.com/jorisroovers/gitlint/blob/main/CHANGELOG.md" +'Source Commit' = "https://github.com/jorisroovers/gitlint/tree/{commit_hash}/gitlint-core" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 555f4f3..8882b6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,8 +45,8 @@ Homepage = "https://jorisroovers.github.io/gitlint" Documentation = "https://jorisroovers.github.io/gitlint" Source = "https://github.com/jorisroovers/gitlint" Changelog = "https://github.com/jorisroovers/gitlint/blob/main/CHANGELOG.md" -source_archive = "https://github.com/jorisroovers/gitlint/archive/{commit_hash}.zip" -source_commit = "https://github.com/jorisroovers/gitlint/tree/{commit_hash}" +'Source Archive' = "https://github.com/jorisroovers/gitlint/archive/{commit_hash}.zip" +'Source Commit' = "https://github.com/jorisroovers/gitlint/tree/{commit_hash}" # Use metadata hooks specified in 'hatch_build.py' # (this line is critical when building wheels, when building sdist it seems optional) -- cgit v1.2.3