Skip build for lightweight stages (analyse, architect, release, maintenance)
These stages only read code and post comments — no need for npm install, frontend build, Playwright, or migrations. Saves several minutes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d220623a9f
commit
9bca465565
|
|
@ -460,6 +460,11 @@ resource "coder_agent" "main" {
|
||||||
# Switch to develop branch if it exists
|
# Switch to develop branch if it exists
|
||||||
git fetch origin develop 2>/dev/null && git checkout develop 2>/dev/null || true
|
git fetch origin develop 2>/dev/null && git checkout develop 2>/dev/null || true
|
||||||
|
|
||||||
|
# Lightweight stages only need the code, not a full build
|
||||||
|
LIGHT_STAGES="analyse architect release maintenance"
|
||||||
|
if echo "$LIGHT_STAGES" | grep -qw "$TASK_TYPE"; then
|
||||||
|
echo "Lightweight stage ($TASK_TYPE) — skipping build"
|
||||||
|
else
|
||||||
# Install deps if package.json exists
|
# Install deps if package.json exists
|
||||||
if [ -f package.json ]; then
|
if [ -f package.json ]; then
|
||||||
npm ci --legacy-peer-deps || npm ci
|
npm ci --legacy-peer-deps || npm ci
|
||||||
|
|
@ -481,6 +486,7 @@ resource "coder_agent" "main" {
|
||||||
echo "Local migrations applied"
|
echo "Local migrations applied"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Automated task execution ---
|
# --- Automated task execution ---
|
||||||
if [ -n "$TASK_TYPE" ] && [ -d ~/project ]; then
|
if [ -n "$TASK_TYPE" ] && [ -d ~/project ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue