Skip to main content

max / goingson

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 updater bundle, 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: 05bfe0b78ed9cea6a2237c734fa53f1c973a5718
Parent: 29e1783
2 files changed, +4 insertions, -6 deletions
@@ -30,9 +30,8 @@ sh_ok(h, "cd " + r + " && . ~/.tauri/passwords.env && " +
30 30 step("collect");
31 31 // Resolve concrete paths (collect quotes its source, so a glob would not expand
32 32 // for a local host — fw13 is the daemon's own host).
33 - let appimage = sh(h, "ls -t " + r + "/target/release/bundle/appimage/*.AppImage | head -1").stdout_tail.trim();
34 - if appimage == "" { throw "no .AppImage produced for " + target(); }
33 + let appimage = resolve_artifact(h, r + "/target/release/bundle/appimage/*.AppImage");
35 34 collect(h, appimage, "goingson", v);
36 - let deb = sh(h, "ls -t " + r + "/target/release/bundle/deb/*.deb 2>/dev/null | head -1").stdout_tail.trim();
35 + let deb = resolve_artifact_opt(h, r + "/target/release/bundle/deb/*.deb");
37 36 if deb != "" { collect(h, deb, "goingson", v); }
38 37 log("GoingsOn " + target() + " v" + v + " collected.");
@@ -28,8 +28,7 @@ sh_ok(h, "cd " + r + " && . ~/.tauri/passwords.env && ./dist/release-macos.sh --
28 28
29 29 // The DMG name embeds the version; resolve it rather than reconstruct it.
30 30 step("verify");
31 - let dmg = sh(h, "ls -t " + r + "/target/release/bundle/dmg/*.dmg | head -1").stdout_tail.trim();
32 - if dmg == "" { throw "no .dmg produced under target/release/bundle/dmg/"; }
31 + let dmg = resolve_artifact(h, r + "/target/release/bundle/dmg/*.dmg");
33 32 if !verify_gatekeeper(h, dmg) {
34 33 throw "DMG is not Gatekeeper-accepted as Notarized Developer ID: " + dmg;
35 34 }
@@ -37,7 +36,7 @@ if !verify_gatekeeper(h, dmg) {
37 36 step("collect");
38 37 collect(h, dmg, "goingson", v);
39 38 // Updater artifacts (.app.tar.gz + .sig) for OTA, when the build produced them.
40 - let upd = sh(h, "ls -t " + r + "/target/release/bundle/macos/*.app.tar.gz 2>/dev/null | head -1").stdout_tail.trim();
39 + let upd = resolve_artifact_opt(h, r + "/target/release/bundle/macos/*.app.tar.gz");
41 40 if upd != "" {
42 41 collect(h, upd, "goingson", v);
43 42 collect(h, upd + ".sig", "goingson", v);