Support legacy module version declarations
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user