Files
ai-app/.dev-updater.ron

50 lines
2.3 KiB
Plaintext

// Read by Dev Updater. Structured as the body of the config: no outer
// parentheses, so nothing here is indented for the sake of a wrapper.
//
// This file sits at the checkout root because the project Dev Updater
// serves is the whole repository -- one checkout producing two things.
// Each component says where it lives with `cwd`, relative to this
// directory, rather than one of them reaching out of the other with `../`.
// What to call this project before there is a build to read a label from.
// A built APK wins: it is the authority on what will actually install.
label: "AI Sessions",
// Where this project's own state lives, said rather than guessed: it is
// what the Uninstall dialog offers to delete, and a plausible-looking
// path it worked out would read as "this component keeps nothing here"
// when it was wrong. `Ron` rather than `Script` because the answer is
// three constants -- there is nothing here worth spawning a process for.
resources: Ron("resources.ron"),
// The server and Rust app build in parallel.
components: [
Server(
name: "server",
build: "cargo build --release",
cwd: "server",
// Dev Updater's own built-in service implementation, generated
// into its data directory and driven through the same interface a
// project-supplied script would be. ai-app carried a script of its
// own until 2026-08-28; it ran `target/release/ai-server` with no
// arguments and no environment, which is the generic case exactly,
// so it was two copies of one thing and the copy that could not be
// tested from here -- the OpenRC branch -- was duplicated with it.
//
// Resolved against this component's `cwd`, so this is
// `server/target/release/ai-server`.
service: Managed("target/release/ai-server"),
),
Apk(
name: "app",
modes: ["release", "debug"],
build: "./build-apk.sh",
cwd: "app",
// The Enroll button in this component's settings: prints the link
// that enrols the phone against the server built here, for the
// reinstalls -- a signing change, a new phone -- where nobody is at
// the terminal the QR would be printed on.
enroll: "server/enroll-link.sh",
),
],