Support legacy module version declarations
Dependency Audit / dependency-audit (push) Failing after 1m42s
Deployment Installer / deployment-installer (push) Successful in 6s
Security Audit / security-audit (push) Successful in 10m43s

This commit is contained in:
2026-08-04 15:08:46 +02:00
parent 492449a4e2
commit 774793976c
3 changed files with 15 additions and 6 deletions
+5 -4
View File
@@ -66,10 +66,11 @@ tags. The default preflight intentionally does not require those heads to exist
in the previous release baseline. A failed candidate-baseline check therefore
cannot produce a protected package release.
The source gate validates `pyproject.toml`, module `MODULE_VERSION`, public
package `__version__`, and WebUI metadata before creating tags. Release-tag
artifact checks run only after the candidate tags and immutable WebUI lock have
been created locally.
The source gate validates `pyproject.toml`, the module version declaration
(`MODULE_VERSION` or the top-level `ModuleManifest.version`), public package
`__version__`, and WebUI metadata before creating tags. Release-tag artifact
checks run only after the candidate tags and immutable WebUI lock have been
created locally.
It builds one wheel and, where applicable, one npm tarball. The workflow records
the source tag, source commit, filename, size, and SHA-256 in
+2 -1
View File
@@ -74,7 +74,8 @@ class ReleaseEntrypointGateTests(unittest.TestCase):
def test_version_updater_targets_canonical_runtime_declarations(self) -> None:
script = (META_ROOT / "tools" / "release" / "push-release-tag.sh").read_text()
self.assertIn("could not update MODULE_VERSION", script)
self.assertIn("^manifest\\s*=\\s*ModuleManifest", script)
self.assertIn("could not update module version declaration", script)
self.assertIn("update_package_init_versions", script)
self.assertNotIn("could not update ModuleManifest.version", script)
+8 -1
View File
@@ -338,8 +338,15 @@ text, count = re.subn(
text,
count=1,
)
if count == 0:
text, count = re.subn(
r'(?ms)(^manifest\s*=\s*ModuleManifest\(.*?^\s*version\s*=\s*)["\'][^"\']+["\'](,?\s*)$',
rf'\1"{new_version}"\2',
text,
count=1,
)
if count != 1:
raise SystemExit(f"could not update MODULE_VERSION in {path}")
raise SystemExit(f"could not update module version declaration in {path}")
path.write_text(text)
PYCODE
done