#!/usr/bin/env bash # Apply and ship a list of rounds, stopping at the first failure. # bash chain.sh 18 19 20 # Each round: node patch-round.cjs && bash src-tauri/android/ship.sh commit-msg.txt # (ship.sh = mock walk -> deploy -> phone walk -> commit, each gated.) set -u S="C:/Users/Kyle/AppData/Local/Temp/claude/F--Coding-SoulStream/5488514a-11e8-482a-b0a0-20cb511ee110/scratchpad" cd /f/Coding/SoulStream || exit 1 for n in "$@"; do echo "===== round $n $(date +%H:%M:%S)" if [ ! -f "$S/patch-round$n.cjs" ]; then echo " no patch for round $n"; exit 1; fi if [ ! -f "$S/commit-msg$n.txt" ]; then echo " no commit message for round $n"; exit 1; fi if grep -qi "co-authored\|anthropic\|claude" "$S/commit-msg$n.txt"; then echo " REFUSING: attribution found in commit-msg$n.txt"; exit 1 fi # the tree must be clean before a round starts: ship.sh commits with `git add -A`, # so anything a stray writer left behind would ride along into Kyle's commit. dirty=$(git status --porcelain) if [ -n "$dirty" ]; then echo " REFUSING: the working tree is not clean before round $n" echo "$dirty" | head -20 exit 1 fi node "$S/patch-round$n.cjs" || { echo " PATCH $n FAILED"; exit 1; } bash src-tauri/android/ship.sh "$S/commit-msg$n.txt" || { echo " SHIP $n FAILED"; exit 1; } echo "== shipped $n $(date +%H:%M:%S)" done echo "===== all rounds shipped $(date +%H:%M:%S)" git log --oneline -8