Skip to content

Commit 55bbfb4

Browse files
soodokuclaude
andcommitted
Give dynamic versioning a fallback for git-less builds
The Docker build copies only pyproject.toml and rmcp/ (.dockerignore excludes .git), so hatchling had no repository to read a tag from: RuntimeError: Error getting the version from source `uv-dynamic-versioning`: This does not appear to be a Git project That failed the image build, which in turn skipped r-testing, docker-scenarios and production-container-tests -- the same dependency chain that hid the R suite last time. fallback-version keeps git-less builds working. It cannot mask a bad release: release builds run in a full checkout with fetch-depth 0, and the publish workflow asserts the built version matches the tag, so a fallback reaching PyPI would fail the guard rather than upload 0.0.0. Reproduced locally by building from a copy of just pyproject.toml and rmcp/, which is what the Docker context actually contains. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7c0da97 commit 55bbfb4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ source = "uv-dynamic-versioning"
9696
[tool.uv-dynamic-versioning]
9797
vcs = "git"
9898
style = "pep440"
99+
# The Docker build copies only pyproject.toml and rmcp/ (.dockerignore
100+
# excludes .git), so there is no repository to read a tag from. Without a
101+
# fallback the backend raises "This does not appear to be a Git project" and
102+
# the image build fails. Release builds run in a full checkout and derive the
103+
# real version from the tag; the publish workflow asserts that it matches.
104+
fallback-version = "0.0.0"
99105

100106
# Flat layout: the package lives at the repo root, not under src/.
101107
[tool.hatch.build.targets.wheel]

0 commit comments

Comments
 (0)