diff --git a/scripts/guibuild.py b/scripts/guibuild.py index aabbe65..c8d28ee 100755 --- a/scripts/guibuild.py +++ b/scripts/guibuild.py @@ -390,9 +390,32 @@ def build_velopack(version: str) -> Path: ) artifact.unlink(missing_ok=True) setup.rename(artifact) + rename_feed_packages(releases_dir) return artifact +def rename_feed_packages(releases_dir: Path) -> None: + """Lowercase the update-feed nupkgs in place. + + Gitea sorts release assets with capitals first: MediaHive-*-full.nupkg + listed right between the Setup/AppImage downloads invites confusion. + As mediahive-*-full.nupkg they group with the wheel/sdist instead. + The feed manifests reference the filename, so patch those too. + """ + manifests = [ + p + for pattern in ("RELEASES", "releases.*.json", "assets.*.json") + for p in releases_dir.glob(pattern) + ] + for nupkg in releases_dir.glob("MediaHive-*-full.nupkg"): + new_name = "mediahive-" + nupkg.name.removeprefix("MediaHive-") + for manifest in manifests: + text = manifest.read_text() + if nupkg.name in text: + manifest.write_text(text.replace(nupkg.name, new_name)) + nupkg.rename(nupkg.with_name(new_name)) + + def force_macos_user_install(pkg: Path) -> None: """Restrict the Velopack-generated pkg to per-user installs (~/Applications).