summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2023-02-10 11:44:54 +0000
committerGitHub <noreply@github.com>2023-02-10 11:44:54 +0000
commitb409f3078503b5aee707c26982fa303b670d41cc (patch)
treec2651c2d2301147032bd24174cc63f40c2ac5ff3
parent1863de4b0ea84a9217e8ef31a751d10dd114ae15 (diff)
Metadata urls to source commit for gitlint-core (#441)
This enables traceability from the build to the source code for gitlint-core.
-rw-r--r--gitlint-core/pyproject.toml14
-rw-r--r--pyproject.toml4
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)