diff --git a/pyproject.toml b/pyproject.toml index 18434d5..49630cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "labops" -version = "0.9.1" +dynamic = ["version"] description = "YAML Based homeLAB" readme = "README.md" requires-python = ">=3.12" @@ -25,6 +25,11 @@ Issues = "https://github.com/FreezeManny/labops/issues" requires = ["hatchling"] build-backend = "hatchling.build" +# The version lives in src/__about__.py so that release bumps never touch +# uv.lock; see the comment there. +[tool.hatch.version] +path = "src/__about__.py" + [tool.hatch.build.targets.wheel] packages = ["src", "models", "labops_cli.py"] diff --git a/release-please-config.json b/release-please-config.json index 4190194..e995d3d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -7,11 +7,9 @@ "package-name": "labops", "release-type": "python", "extra-files": [ - "pyproject.toml", { - "type": "toml", - "path": "uv.lock", - "jsonpath": "$.package[?(@.name=='labops')].version" + "type": "generic", + "path": "src/__about__.py" } ] } diff --git a/src/__about__.py b/src/__about__.py new file mode 100644 index 0000000..2eef54b --- /dev/null +++ b/src/__about__.py @@ -0,0 +1,6 @@ +# The single source of truth for the version, deliberately kept out of +# pyproject.toml. uv records a version for the root package in uv.lock only when +# pyproject states one statically, so a release bump there left the lock stale +# and `uv sync --locked` failed on every release PR. With a dynamic version the +# lock carries no version at all and the bump cannot desynchronise it. +__version__ = "0.9.1" # x-release-please-version diff --git a/uv.lock b/uv.lock index ce3c15d..fa05b8c 100644 --- a/uv.lock +++ b/uv.lock @@ -399,7 +399,6 @@ wheels = [ [[package]] name = "labops" -version = "0.9.1" source = { editable = "." } dependencies = [ { name = "ansible-core" },