Four targets (MWBCore, MWBNet, MWBMac, mwb) with a layering test that keeps MWBCore free of AppKit/CoreGraphics/Network; tools/gates.sh as the definition of done; tools/bundle.sh producing a signed dist/mwb.app; tools/lane.sh for lane worktrees; smoke binary with --version and --check-permissions. docs/loop.md records the Dev -> QA -> lead loop with the literal dispatch prompts, the wave schedule and escalations. Co-Authored-By: Claude Fable 5.1 <[email protected]>
33 lines
1.2 KiB
Bash
Executable File
33 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# The definition of "done" for every lane (CLAUDE.md, Swift standards):
|
|
# 1. swift-format lint --strict is clean
|
|
# 2. swift build with warnings as errors is clean
|
|
# 3. swift test is green, under the runaway guard
|
|
# Exit 0 only if all three pass. Run from anywhere; operates on the repo
|
|
# that contains this script (so it works inside a lane worktree).
|
|
#
|
|
# Usage: tools/gates.sh [--no-test]
|
|
set -euo pipefail
|
|
root=$(cd "$(dirname "$0")/.." && pwd)
|
|
cd "$root"
|
|
|
|
run_tests=1
|
|
[ "${1:-}" = "--no-test" ] && run_tests=0
|
|
|
|
echo "== gate 1/3: swift-format lint --strict"
|
|
xcrun swift-format lint --strict --recursive Sources Tests Package.swift
|
|
|
|
echo "== gate 2/3: swift build -Xswiftc -warnings-as-errors"
|
|
swift build -Xswiftc -warnings-as-errors 2>&1 | grep -v '^\[' || true
|
|
# grep swallows the exit status; re-check with a cheap incremental build.
|
|
swift build -Xswiftc -warnings-as-errors >/dev/null
|
|
|
|
if [ "$run_tests" = 1 ]; then
|
|
echo "== gate 3/3: swift test (guarded: 8 GB / 15 min)"
|
|
# pipefail is set, so a guard kill or a failing test fails this line.
|
|
tools/guard.sh -m 8 -t 900 -- swift test 2>&1 | grep -E "Executed|error:|failed|passed after" | tail -20
|
|
else
|
|
echo "== gate 3/3: skipped (--no-test)"
|
|
fi
|
|
echo "== gates: all green"
|