Modern Apps git

← MAOS.git

maos: MAOS_TREE overrides the AOSP checkout path in build-maos.sh

Commit
17e60a75dea2fc8c3e43b3548a0a5d9a7cf97663
Author
Vayun Mathur <[email protected]>
When
2026-11-11 02:34 UTC (25 days ago)
Parents
460dcf5
TREE was hardcoded to $HOME/maos. Remote builds (location_share_server
scripts/vast: sync/vendor/overlay/build on a rented box) and release
signing on our server (a minimal tree with only releases/<build>/,
script/ and prebuilts/build-tools) need a different path, which so far
meant running the script with a faked HOME. MAOS_TREE=<path> now selects
the tree; unset, it is $HOME/maos exactly as before, so every existing
invocation behaves the same. Help text and the "Hardcoded" header updated.

Verified: bash -n; with MAOS_TREE unset the resolved TREE is unchanged.

Diff

build-maos.sh
diff --git a/build-maos.sh b/build-maos.shindex 50a0674..4f1b721 100755--- a/build-maos.sh+++ b/build-maos.sh@@ -53,9 +53,12 @@ #   MAOS_RELEASE_JOBS=<n>          how many devices to sign/package (release) in parallel (default 4). #   MAOS_PUBLISH_JOBS=<n>          how many devices to upload (publish) in parallel (default 4). #   MAOS_BUILD_NUMBER=<n>          pin the build number (default: today's UTC date + "00").+#   MAOS_TREE=<path>               AOSP checkout to use (default: $HOME/maos). Lets a rented+#                                  build box or the release signer point at its own tree, e.g.+#                                  a minimal one holding only releases/<build>/ + script/. # # ── Hardcoded ─────────────────────────────────────────────────────────────────────────────-#   TREE=$HOME/maos (ext4 checkout)   R2_BUCKET=maos   BUILD=<tag> (matches the GrapheneOS tag)+#   R2_BUCKET=maos   BUILD=<tag> (matches the GrapheneOS tag) # set -euo pipefail @@ -89,7 +92,7 @@ else fi  # ---- Hardcoded config -----TREE="$HOME/maos"                              # AOSP checkout (ext4; never /mnt/c)+TREE="${MAOS_TREE:-$HOME/maos}"                # AOSP checkout (ext4; never /mnt/c) R2_BUCKET="maos"                               # R2 bucket / ota.maproj.org # BUILD starts as the tag, but the build number for a run is pinned by pin_build_number # (today's UTC date + "00", or $MAOS_BUILD_NUMBER) and exported as BUILD_NUMBER so every