feat: implement institutional governance and recovery architecture
This commit is contained in:
@@ -9,6 +9,7 @@ import re
|
||||
import subprocess
|
||||
import tomllib
|
||||
|
||||
from .contracts import parse_manifest_contract
|
||||
from .model import RepositorySnapshot, RepositorySpec, VersionSnapshot
|
||||
from .workspace import resolve_repo_path
|
||||
|
||||
@@ -130,12 +131,9 @@ def read_manifest_versions(path: Path) -> tuple[str, ...]:
|
||||
return ()
|
||||
versions: list[str] = []
|
||||
for manifest in sorted(src.glob("**/backend/manifest.py")):
|
||||
text = manifest.read_text(encoding="utf-8")
|
||||
match = re.search(r'(?m)^\s*version\s*=\s*["\']([^"\']+)["\']', text)
|
||||
if match is None:
|
||||
match = re.search(r'(?m)^MODULE_VERSION\s*=\s*["\']([^"\']+)["\']', text)
|
||||
if match is not None:
|
||||
versions.append(match.group(1))
|
||||
contract = parse_manifest_contract(manifest, repo_name=path.name)
|
||||
if contract is not None and contract.module_version is not None:
|
||||
versions.append(contract.module_version)
|
||||
return tuple(versions)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user