diff --git a/scripts/releases/stamping.py b/scripts/releases/stamping.py index 1c851e9ae9..fec238d156 100644 --- a/scripts/releases/stamping.py +++ b/scripts/releases/stamping.py @@ -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 diff --git a/tests/scripts/test_version_stamping.py b/tests/scripts/test_version_stamping.py index 69317cb7fa..bff155864d 100644 --- a/tests/scripts/test_version_stamping.py +++ b/tests/scripts/test_version_stamping.py @@ -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")