feat(13-09): retarget AIUI build/deploy to the in-repo aiui/ tree (D-19)
Finishes the 13-09 build-aiui.sh WIP checkpoint (30b2e02f) that survived the
operator reboot ground-truthed and confirmed correct: require_base_path,
frozen-lockfile install, verify_dist's asset-href/commit-attribution checks
all verified working against a real build. Fixed one grep-forbidden leftover
(a comment mentioning the retired scripts/aiui.pin path).
Rewires both AIUI sections of deploy-to-target.sh (primary --live path and
the --both/secondary path) and setup-aiui-server.sh to build/deploy from
aiui/packages/app/dist instead of the retired ../AIUI sibling checkout:
- Primary section now calls scripts/build-aiui.sh instead of an inline
`pnpm build`, then scripts/verify-aiui-deploy.sh after the copy. The
demo/aiui/ fallback now prints a loud, unmissable warning naming that it
is shipping a checked-in dist rather than a fresh build.
- Secondary/--both section retargeted to the in-repo dist path; its
fallback-to-.228-streaming behavior is otherwise unchanged.
- setup-aiui-server.sh calls scripts/build-aiui.sh automatically when the
dist is missing or stale, instead of printing a manual `cd ../AIUI/...`
command and exiting (D-15: enforced, not remembered).
No remaining `../AIUI` reference in either script.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
442122083f
commit
073bf6f33d
@@ -24,8 +24,10 @@
|
||||
# script has nothing to do with the key anymore.
|
||||
#
|
||||
# Prerequisites:
|
||||
# - AIUI must be built locally first: cd AIUI/packages/app && VITE_BASE_PATH=/aiui/ npx vite build
|
||||
# - SSH key access to target server
|
||||
# - AIUI is built automatically (via scripts/build-aiui.sh) when its dist
|
||||
# is missing or stale — D-19 (2026-08-03): AIUI lives in-repo at aiui/
|
||||
# now, so there is no second checkout to build separately first.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -41,15 +43,28 @@ if [ -z "$TARGET_HOST" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
AIUI_DIST="$PROJECT_DIR/../AIUI/packages/app/dist"
|
||||
if [ ! -f "$AIUI_DIST/index.html" ]; then
|
||||
echo "ERROR: AIUI build not found at $AIUI_DIST"
|
||||
echo "Build it first: cd ../AIUI/packages/app && VITE_BASE_PATH=/aiui/ npx vite build"
|
||||
exit 1
|
||||
fi
|
||||
AIUI_DIST="$PROJECT_DIR/aiui/packages/app/dist"
|
||||
AIUI_SRC="$PROJECT_DIR/aiui/packages/app/src"
|
||||
|
||||
timestamp() { echo "[$(date +%H:%M:%S)]"; }
|
||||
|
||||
# D-19 (2026-08-03): AIUI lives in-repo at aiui/ — no second checkout to
|
||||
# build separately first. Build it automatically when the dist is missing
|
||||
# or stale, via the one supported build path (scripts/build-aiui.sh
|
||||
# enforces VITE_BASE_PATH, installs from the committed lockfile, and
|
||||
# attributes the build to this repo's own commit). D-15's "enforced, not
|
||||
# remembered" applies here too — a script that only prints instructions is
|
||||
# the remembered form.
|
||||
if [ ! -f "$AIUI_DIST/index.html" ] || [ "$(find "$AIUI_SRC" -newer "$AIUI_DIST/index.html" -print -quit 2>/dev/null)" != "" ]; then
|
||||
echo "$(timestamp) AIUI dist missing or stale — building via scripts/build-aiui.sh..."
|
||||
bash "$PROJECT_DIR/scripts/build-aiui.sh"
|
||||
fi
|
||||
|
||||
if [ ! -f "$AIUI_DIST/index.html" ]; then
|
||||
echo "ERROR: AIUI build not found at $AIUI_DIST after running scripts/build-aiui.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "╔════════════════════════════════════════════════════════════╗"
|
||||
echo "║ Archipelago AIUI deploy ║"
|
||||
echo "║ Target: $TARGET_HOST"
|
||||
|
||||
Reference in New Issue
Block a user