mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 05:05:56 +00:00
Add tools/make_release.py, which assembles the installer release folder from pinned downloads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
227ed0f680
commit
1ece856440
6 files changed
+478
-4
No files matched your search
@@ -47,7 +47,9 @@ def list_files(staged: bool) -> list[Path]:
|
||||
return [Path(p) for p in out.decode("utf-8").split("\0") if p]
|
||||
|
||||
|
||||
def problems_for(path: Path) -> list[str]:
|
||||
def problems_for(path: Path, allow_large: bool = False) -> list[str]:
|
||||
"""allow_large: files over MAX_BYTES (toolchain binaries in a release folder) are checked for the generated marker
|
||||
only, not refused."""
|
||||
found = []
|
||||
if path.suffix.lower() in BLOCKED_SUFFIXES:
|
||||
found.append(f"blocked file type {path.suffix}")
|
||||
@@ -56,6 +58,10 @@ def problems_for(path: Path) -> list[str]:
|
||||
if not path.is_file():
|
||||
return found
|
||||
size = path.stat().st_size
|
||||
if size > MAX_BYTES and allow_large:
|
||||
if GENERATED_MARKER.encode() in path.read_bytes():
|
||||
found.append("generated from game code")
|
||||
return found
|
||||
if size > MAX_BYTES:
|
||||
found.append(f"{size // 1024} KiB, over the {MAX_BYTES // 1024} KiB limit")
|
||||
return found
|
||||
|
||||
Reference in new issue
Block a user