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 since dd72571178.

(cherry picked from commit 8411fdb333)
This commit is contained in:
alt-glitch
2026-09-23 02:00:32 -04:00
committed by ethernet
parent 20c519ec48
commit 8d34601f47
2 changed files with 17 additions and 1 deletions
+3 -1
View File
@@ -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
+14
View File
@@ -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")