Project-2 baseline

This commit is contained in:
2026-10-04 21:19:23 -04:00
parent 0f04889edf
commit 213eb3c403
861 changed files with 1710 additions and 3363322 deletions

View File

@@ -159,6 +159,31 @@ if [ ! -f "$TASK_DIR/tests/test-commands.sh" ]; then
fi
fi
# 3. Companion service. strongsuit-app throws rather than degrades when the strongsuit_phx
# backend on :4201 is absent, so stage it for Dockerfile.strongsuit-app to COPY.
#
# Tracked, not gitignored: harbor-regrade and the benchmark sweep build task images without
# running this script, and a missing COPY source fails the build (as for browser-optin).
if [ "$MEMBER_LC" = "strongsuit-app" ]; then
PHX_SRC="$TOOLKIT_ROOT/repos/strongsuit_phx"
PHX_SEED_SRC="$TOOLKIT_ROOT/explore/scripts/seed"
PHX_STAGE="$TASK_DIR/environment/phx"
PHX_SEED_STAGE="$TASK_DIR/environment/phx-seed"
if [ -d "$PHX_SRC/.git" ] && [ -d "$PHX_SEED_SRC" ]; then
PHX_PIN=$(node -e "const r=require('$TOOLKIT_ROOT/toolkit.json').repos.find(x=>x.repo==='strongsuit_phx');process.stdout.write(r&&r.defaultCommit||'HEAD')" 2>/dev/null || echo HEAD)
PHX_SHA=$(resolve_pin "$PHX_SRC" "$PHX_PIN" "$TOOLKIT_ROOT/task-shared/commit-maps" strongsuit_phx) || exit 1
rm -rf "$PHX_STAGE" "$PHX_SEED_STAGE"
mkdir -p "$PHX_STAGE" "$PHX_SEED_STAGE"
git -C "$PHX_SRC" archive "$PHX_SHA" | tar -x --no-same-owner -C "$PHX_STAGE"
cp "$PHX_SEED_SRC"/*.sh "$PHX_SEED_STAGE"/
chmod +x "$PHX_SEED_STAGE"/*.sh
echo " Staged Phoenix backend: environment/phx/ (${PHX_SHA:0:9}) + environment/phx-seed/"
else
echo " WARN: strongsuit_phx sources not found under repos/ — the task image will have no" >&2
echo " backend on :4201, and the strongsuit-app pages that read it will throw." >&2
fi
fi
# Clean and recreate
rm -rf "$WORKSPACE"
mkdir -p "$WORKSPACE"