From 3f78f172d9f9fe1a9422334c5ae03cd5ac685ebd Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Wed, 16 Sep 2026 18:43:23 +0300 Subject: fix: address release promotion review findings --- scripts/release.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/release.py') diff --git a/scripts/release.py b/scripts/release.py index b02c89cf..db9bd3fc 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -98,8 +98,8 @@ def validate_diff(preview: str, candidate: str, version: str | None = None) -> N raise ValueError(f"unpreviewed change: {path}; publish a new preview first") # Documentation exceptions must not turn into symlinks or submodules. entry = git("ls-tree", candidate, "--", path) - if entry and not entry.startswith("100644 blob "): - raise ValueError(f"release preparation must use regular files: {path}") + if (not entry and path in RELEASE_FILES) or (entry and not entry.startswith("100644 blob ")): + raise ValueError(f"release preparation must preserve regular files: {path}") versions = [normalized_cargo(git("show", f"{candidate}:{path}"), path)[1] for path in ("Cargo.toml", "Cargo.lock")] if versions[0] != versions[1] or (version is not None and versions[0] != version): -- cgit v1.2.3