Skip to main content

max / audiofiles

dist: use resolve_artifact for strict release-artifact selection Replace `sh("ls -t <glob> | head -1")` guarded on an empty string with Bento's resolve_artifact / resolve_artifact_opt: exactly-one match for the required AppImage/dmg, zero-or-one for the optional deb, and a hard error on an ambiguous match instead of a stale newest-by-mtime pick. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-23 21:03 UTC
Commit: ed2fe88700ebcfbec5c984c030f2a6d5566e9947
Parent: 61240f8
2 files changed, +3 insertions, -5 deletions
@@ -25,9 +25,8 @@ sh_ok(h, "cd " + r + " && ./dist/build-appimage.sh");
25 25 sh_ok(h, "cd " + r + " && ./dist/build-deb.sh");
26 26
27 27 step("collect");
28 - let appimage = sh(h, "ls -t " + r + "/dist/*.AppImage | head -1").stdout_tail.trim();
29 - if appimage == "" { throw "no .AppImage produced for " + target(); }
28 + let appimage = resolve_artifact(h, r + "/dist/*.AppImage");
30 29 collect(h, appimage, "audiofiles", v);
31 - let deb = sh(h, "ls -t " + r + "/dist/*.deb 2>/dev/null | head -1").stdout_tail.trim();
30 + let deb = resolve_artifact_opt(h, r + "/dist/*.deb");
32 31 if deb != "" { collect(h, deb, "audiofiles", v); }
33 32 log("audiofiles " + target() + " v" + v + " collected.");
@@ -27,8 +27,7 @@ sh_ok(h, "cd " + r + " && ./dist/build-macos.sh");
27 27
28 28 // DMG name uses `uname -m` (arm64), not the target arch slug — resolve it.
29 29 step("verify");
30 - let dmg = sh(h, "ls -t " + r + "/dist/Audiofiles_*.dmg | head -1").stdout_tail.trim();
31 - if dmg == "" { throw "no .dmg produced under dist/"; }
30 + let dmg = resolve_artifact(h, r + "/dist/Audiofiles_*.dmg");
32 31 if !verify_gatekeeper(h, dmg) {
33 32 throw "DMG is not Gatekeeper-accepted as Notarized Developer ID: " + dmg;
34 33 }