mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo.git
synced 2026-09-21 16:52:01 -07:00
Add state.sh to print each role branch HEAD and the main-checkout status. Update the briefing to use the single tmp/aps checkout, note daemon self-healing, and point merge verification at verify.sh and the architect's verification record. By specifier.
28 lines
802 B
Bash
Executable File
28 lines
802 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Print current SwarmForge state: each role branch's HEAD and the main checkout
|
|
# working-tree status. Use this to refresh the "Current master HEAD" section of
|
|
# the specifier briefing without manual git inspection.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
cd "$ROOT"
|
|
|
|
head_line() {
|
|
local branch="$1"
|
|
if git rev-parse --verify -q "$branch" >/dev/null 2>&1; then
|
|
printf '%s HEAD: %s %s\n' "$branch" "$(git rev-parse --short=10 "$branch")" "$(git log -1 --format=%s "$branch")"
|
|
fi
|
|
}
|
|
|
|
head_line master
|
|
head_line swarmforge-coder
|
|
head_line swarmforge-refactorer
|
|
head_line swarmforge-architect
|
|
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo "main working tree: dirty"
|
|
else
|
|
echo "main working tree: clean"
|
|
fi
|