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:
co-authored by
Claude Sonnet 5
parent
4f69405af6
commit
335ff5e31a
@@ -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
|
||||
|
||||
+5
-2
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "comfydv"
|
||||
version = "0.1.0"
|
||||
dynamic = ["version"]
|
||||
requires-python = ">=3.11"
|
||||
description = "Quality of life ComfyUI nodes: dynamic string formatting, seed-controlled random selection, and conditional queue interruption."
|
||||
readme = "README.md"
|
||||
@@ -17,9 +17,12 @@ Repository = "https://github.com/darth-veitcher/comfydv"
|
||||
Documentation = "https://darth-veitcher.github.io/comfydv/stable/"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
requires = ["hatchling", "hatch-vcs"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "vcs"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"playwright>=1.60.0",
|
||||
|
||||
Reference in New Issue
Block a user