mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
fix: make proxy upgrades version-aware
Derive source-tree versions from release history so headroom --version no longer reports stale project metadata. Restart stale idle proxies after an upgrade, but leave active sessions running to avoid interrupting ongoing conversations. Remove _version.py from version-sync ownership and make version verification catch package/plugin manifest drift.
This commit is contained in:
parent
4a88c698ad
commit
ea1f608e79
7 changed files with 399 additions and 36 deletions
|
|
@ -37,18 +37,6 @@ def bump_version(version: str, bump_type: str) -> str:
|
|||
return f"{major}.{minor}.{patch}"
|
||||
|
||||
|
||||
def update_version_py(root: Path, version: str) -> None:
|
||||
"""Update headroom/_version.py with new version."""
|
||||
version_py_path = root / "headroom" / "_version.py"
|
||||
content = version_py_path.read_text(encoding="utf-8")
|
||||
updated = re.sub(
|
||||
r'__version__ = "[^"]+"',
|
||||
f'__version__ = "{version}"',
|
||||
content,
|
||||
)
|
||||
version_py_path.write_text(updated, encoding="utf-8")
|
||||
|
||||
|
||||
def update_package_json(file_path: Path, version: str) -> None:
|
||||
"""Update a package.json version field."""
|
||||
with open(file_path, encoding="utf-8") as f:
|
||||
|
|
@ -178,7 +166,6 @@ def main() -> None:
|
|||
|
||||
# Update all versioned files
|
||||
update_pyproject_version(args.root, version)
|
||||
update_version_py(args.root, version)
|
||||
update_openclaw_package_json(
|
||||
args.root / "plugins" / "openclaw" / "package.json", version, version
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue