Skip to main content

max / goingson

1.7 KB · 39 lines History Blame Raw
1 // GoingsOn โ€” macOS (aarch64) release recipe for Bento.
2 //
3 // Ports _private/docs/goingson/deploy.md (macOS section). Runs on the mbp host
4 // over the in-session ops-agent transport โ€” the only context where the
5 // Developer ID key is usable (Bento design ยง7 "THE WALL"). `release-macos.sh
6 // --keychain` does build + codesign + notarize + staple + a Gatekeeper
7 // self-check in one pass; we re-verify Gatekeeper here (the proof the publish
8 // gate requires) and collect the DMG + updater artifacts into Bento's dist
9 // tree. OTA upload stays manual via the MNW dashboard โ€” no publish() call.
10
11 let h = build_host();
12 let v = version();
13 let r = repo();
14
15 step("checkout");
16 sh_ok(h, "cd " + r + " && git pull --ff-only");
17
18 // release-macos.sh: build, sign (ephemeral build keychain), notarize, staple.
19 step("build");
20 sh_ok(h, "cd " + r + " && . ~/.tauri/passwords.env && ./dist/release-macos.sh --keychain");
21
22 // The DMG name embeds the version; resolve it rather than reconstruct it.
23 step("verify");
24 let dmg = sh(h, "ls -t " + r + "/target/release/bundle/dmg/*.dmg | head -1").stdout_tail.trim();
25 if dmg == "" { throw "no .dmg produced under target/release/bundle/dmg/"; }
26 if !verify_gatekeeper(h, dmg) {
27 throw "DMG is not Gatekeeper-accepted as Notarized Developer ID: " + dmg;
28 }
29
30 step("collect");
31 collect(h, dmg, "goingson", v);
32 // Updater artifacts (.app.tar.gz + .sig) for OTA, when the build produced them.
33 let upd = sh(h, "ls -t " + r + "/target/release/bundle/macos/*.app.tar.gz 2>/dev/null | head -1").stdout_tail.trim();
34 if upd != "" {
35 collect(h, upd, "goingson", v);
36 collect(h, upd + ".sig", "goingson", v);
37 }
38 log("GoingsOn macOS v" + v + " built, notarized, and collected. Upload OTA artifacts via the MNW dashboard.");
39