mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-03 06:48:52 -06:00
fix: purge the old checksum signature with packs
The stale-pack purge kept its own list of release files and left SHA256SUMS.txt.sig behind, which a skipped signing step then published beside a new checksum list. release.sums now owns the release set.
This commit is contained in:
1 parent
e51dc14d7b
commit
8348ba1f32
7 files changed
+42
-15
No files matched your search
@@ -8,6 +8,7 @@ from core.hashing import file_digest
|
||||
from model.releaserecord import PACK_SUFFIX
|
||||
|
||||
SUMS = "SHA256SUMS.txt"
|
||||
SIGNATURE = SUMS + ".sig"
|
||||
|
||||
|
||||
def published_packs(directory: Path) -> list[Path]:
|
||||
@@ -18,6 +19,20 @@ def published_packs(directory: Path) -> list[Path]:
|
||||
)
|
||||
|
||||
|
||||
def release_set_files(directory: Path) -> list[Path]:
|
||||
"""The files a pack build and its release leave in a directory.
|
||||
|
||||
Every ZIP and the legacy `.zip.NNN` slices, the checksum list and its
|
||||
signature: a new build replaces them all, or an old one is published.
|
||||
"""
|
||||
return sorted(
|
||||
path for path in Path(directory).iterdir()
|
||||
if path.is_file() and (
|
||||
path.suffix == ".zip" or ".zip." in path.name or path.name in (SUMS, SIGNATURE)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def write_sums(directory: Path) -> Path | None:
|
||||
"""Write SHA256SUMS.txt over the published packs, in `sha256sum` form.
|
||||
|
||||
|
||||
Reference in new issue
Block a user