feat(scripts): all-in-one host-house.sh; free stale port; fail-fast join sync
CI / rust client (hh) (macos-latest) (push) Waiting to run
CI / rust client (hh) (ubuntu-latest) (push) Waiting to run
CI / rust coverage (push) Waiting to run
CI / python server (3.10) (push) Waiting to run
CI / python server (3.11) (push) Waiting to run
CI / python server (3.12) (push) Waiting to run
CI / headless e2e smoke (push) Waiting to run
CI / dependency audit (push) Waiting to run
CI / secret scanning (push) Waiting to run
CI / rust client (hh) (macos-latest) (push) Waiting to run
CI / rust client (hh) (ubuntu-latest) (push) Waiting to run
CI / rust coverage (push) Waiting to run
CI / python server (3.10) (push) Waiting to run
CI / python server (3.11) (push) Waiting to run
CI / python server (3.12) (push) Waiting to run
CI / headless e2e smoke (push) Waiting to run
CI / dependency audit (push) Waiting to run
CI / secret scanning (push) Waiting to run
- host-house.sh: one tmux session hosting a room (server window) plus your own GUI client window — builds, frees the port, waits for /health, then attaches. - host-room.sh: free_port() kills any stale LISTENer squatting on the port so the bind can't fail with "address already in use". - join.sh: cap each remote pull with `timeout` + GIT_TERMINAL_PROMPT=0 so an unreachable remote fails fast instead of hanging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -12,10 +12,14 @@ cd "$(dirname "$0")/.."
|
||||
# are best-effort and fast-forward only: an unreachable remote or diverged
|
||||
# history just warns and is skipped — it never blocks you from joining.
|
||||
BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo HEAD)"
|
||||
# Cap each pull so an unreachable/slow remote fails fast instead of hanging on
|
||||
# the OS TCP timeout; GIT_TERMINAL_PROMPT=0 stops it blocking on a credential
|
||||
# prompt. (No `timeout` on this box? fall back to a plain pull.)
|
||||
TO=""; command -v timeout >/dev/null 2>&1 && TO="timeout 10"
|
||||
for remote in gitea origin; do
|
||||
if git remote get-url "$remote" >/dev/null 2>&1; then
|
||||
echo "⛧ syncing $BRANCH from $remote…"
|
||||
git pull --ff-only "$remote" "$BRANCH" 2>&1 \
|
||||
GIT_TERMINAL_PROMPT=0 $TO git pull --ff-only "$remote" "$BRANCH" 2>&1 \
|
||||
|| echo " (skipped — couldn't fast-forward from $remote/$BRANCH)"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user