chore: derive package version from git tags via hatch-vcs

Replaces the static project.version string with dynamic = ["version"],
sourced from the nearest git tag (hatch-vcs). Fixes docs.yml, which read
pyproject.toml's version field directly and would have broken once that
field stopped being a plain string; it now reads the resolved version via
importlib.metadata after `uv sync` installs the package.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
James Veitch
2026-07-04 13:51:55 +01:00
co-authored by Claude Sonnet 5
parent 4f69405af6
commit 335ff5e31a
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -29,5 +29,5 @@ jobs:
- name: Deploy docs with mike
run: |
VERSION=$(uv run python -c "import tomllib; d=tomllib.load(open('pyproject.toml','rb')); print(d['project']['version'])")
VERSION=$(uv run python -c "from importlib.metadata import version; print(version('comfydv'))")
uv run mike deploy --push --update-aliases "$VERSION" stable