| 1 |
// GoingsOn: Linux release recipe for Bento (x86_64 on fw13, aarch64 on astra). |
| 2 |
// |
| 3 |
// One recipe serves both arches: build_host() resolves to whichever native host |
| 4 |
// the topology assigns the target, so there is no cross-compilation and no |
| 5 |
// hard-coded host name. Ports deploy.md (Linux sections): a signed |
| 6 |
// `cargo tauri build` (the Tauri updater key signs the .AppImage.tar.gz for |
| 7 |
// OTA), then collect the AppImage + .deb. Bundle paths are arch-independent. |
| 8 |
// OTA upload stays manual via the MNW dashboard, no publish() call. |
| 9 |
|
| 10 |
let h = build_host(); |
| 11 |
let v = version(); |
| 12 |
let r = repo(); |
| 13 |
|
| 14 |
step("checkout"); |
| 15 |
// Pin to the release tag v<version> (not whatever main is at pull time); the |
| 16 |
// daemon also runs this as a cross-host preflight barrier before any build. |
| 17 |
let sha = checkout_sha(h); |
| 18 |
log("pinned " + h + " to v" + v + " @ " + sha); |
| 19 |
|
| 20 |
// Gate: no artifact is built from code that fails clippy or its tests. It runs |
| 21 |
// on this target's own build host, so a break confined to one platform is |
| 22 |
// caught where it would have shipped. |
| 23 |
step("prebuild"); |
| 24 |
sh_ok(h, "cd " + r + " && cargo clippy --workspace --all-targets " + feature_flags() + " -- -D warnings"); |
| 25 |
sh_ok(h, "cd " + r + " && cargo test --workspace " + feature_flags()); |
| 26 |
|
| 27 |
step("build"); |
| 28 |
sh_ok(h, "cd " + r + " && . ~/.tauri/passwords.env && " + |
| 29 |
"TAURI_SIGNING_PRIVATE_KEY=$HOME/.tauri/goingson.key " + |
| 30 |
"TAURI_SIGNING_PRIVATE_KEY_PASSWORD=$GOINGSON_TAURI_PASSWORD " + |
| 31 |
"cargo tauri build"); |
| 32 |
|
| 33 |
step("collect"); |
| 34 |
// Resolve concrete paths (collect quotes its source, so a glob would not expand |
| 35 |
// for a local host, fw13 is the daemon's own host). |
| 36 |
let appimage = resolve_artifact(h, r + "/target/release/bundle/appimage/*.AppImage"); |
| 37 |
collect(h, appimage, "goingson", v); |
| 38 |
let deb = resolve_artifact_opt(h, r + "/target/release/bundle/deb/*.deb"); |
| 39 |
if deb != "" { collect(h, deb, "goingson", v); } |
| 40 |
log("GoingsOn " + target() + " v" + v + " collected."); |
| 41 |
|