Files
Carmine Paolino 16a9dde2ca Drop the old name from packages, release scripts and docs
Packages no longer install a fastpotify command or declare that they
replace, provide or conflict with the old packages. Releases no longer
carry the 0.9.1 bridge files, the release script only checks and sums
Spotifast downloads, and the Flatpak, Homebrew, macOS and Windows
recipes lose their old-identity branches and clean-ups. Packaging CI
tests the v0.11.2 release instead of installing the 0.8.0 package first.
The Rename page and the notes pointing to it are gone.

Updates begun by 0.10.2 or earlier on Windows relaunch fastpotify.exe,
which the installer no longer provides; such an install updates, but
needs starting by hand once.
2026-10-03 14:18:23 +02:00

36 lines
1.1 KiB
Python

#!/usr/bin/env python3
"""Check a release's Spotifast downloads and write their checksums."""
import argparse
import hashlib
from pathlib import Path
import re
def prepare(directory, tag):
if not re.fullmatch(r"v\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?", tag):
raise ValueError("Expected a release tag")
files = []
for path in directory.iterdir():
if path.name.startswith("spotifast-" + tag + "-"):
if not path.is_file() or path.is_symlink():
raise ValueError(f"Expected a regular release file: {path.name}")
files.append(path)
if not files:
raise ValueError("No release downloads found")
def digest(path):
with path.open("rb") as stream:
return hashlib.file_digest(stream, "sha256").hexdigest()
manifest = "".join(f"{digest(path)} {path.name}\n" for path in sorted(files))
(directory / "checksums.txt").write_text(manifest)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("directory", type=Path)
parser.add_argument("tag")
args = parser.parse_args()
prepare(args.directory, args.tag)