mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-09-28 15:01:00 +08:00
fix(release): stamping a payload snapshot skips the bootstrap-installer check
The payload snapshot omits apps/ (INERT_SNAPSHOT_DIRS), so validate_bootstrap_version raised FileNotFoundError on every native bundle leg sincedd72571178. (cherry picked from commit8411fdb333)
This commit is contained in:
@@ -83,7 +83,9 @@ def stamp(tree: Path, version: str, release_date: str) -> list[Path]:
|
||||
_rewrite(path, pattern, replacement, count=1, flags=flags)
|
||||
touch(path)
|
||||
|
||||
validate_bootstrap_version(tree, version)
|
||||
# A payload snapshot omits apps/ (INERT_SNAPSHOT_DIRS); it carries no installer to disagree with.
|
||||
if (tree / "apps" / "bootstrap-installer").is_dir():
|
||||
validate_bootstrap_version(tree, version)
|
||||
return written
|
||||
|
||||
|
||||
|
||||
@@ -91,3 +91,17 @@ def test_stamping_writes_the_build_tree_and_leaves_the_source_tree(tmp_path, mon
|
||||
from scripts.releases.stamping import validate_bootstrap_version
|
||||
with pytest.raises(ValueError, match="Tauri config"):
|
||||
validate_bootstrap_version(build, "0.21.5")
|
||||
|
||||
|
||||
def test_stamping_a_payload_snapshot_without_apps_stamps_the_runtime(tmp_path):
|
||||
"""The bundled payload snapshot drops apps/ (INERT_SNAPSHOT_DIRS), so it has no installer to validate."""
|
||||
import shutil
|
||||
|
||||
from scripts.releases.stamping import stamp
|
||||
|
||||
_tree(tmp_path)
|
||||
shutil.rmtree(tmp_path / "apps")
|
||||
|
||||
stamp(tmp_path, "0.21.5", "2026.9.22")
|
||||
|
||||
assert 'version = "0.21.5"' in (tmp_path / "pyproject.toml").read_text(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user