← back to Free Roster Memory
add push-to-both.sh — one-command sync to games.aa + emoji.aa
609bb33c94eb0f4877aecf82f0b2a9082781158c · 2026-07-24 23:43:24 -0700 · Steve Abrams
Files touched
Diff
commit 609bb33c94eb0f4877aecf82f0b2a9082781158c
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Jul 24 23:43:24 2026 -0700
add push-to-both.sh — one-command sync to games.aa + emoji.aa
---
push-to-both.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/push-to-both.sh b/push-to-both.sh
new file mode 100755
index 0000000..97e9994
--- /dev/null
+++ b/push-to-both.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+# push-to-both.sh — free-roster-memory is the SOURCE OF TRUTH for the Emoji Memory
+# Match game. This copies index.html into both live downstream sites, commits in
+# each, rsyncs to Kamatera, and verifies each URL is serving the new build.
+#
+# games.aa -> ~/Projects/games-agentabrams/games/emoji-memory/index.html (arcade game)
+# emoji.aa -> ~/Projects/emoji-agentabrams/index.html (standalone site)
+#
+# Usage: bash ~/Projects/free-roster-memory/push-to-both.sh
+# Cost: $0 (local copy + git + rsync). Steve-gated: it deploys to two prod sites.
+set -euo pipefail
+
+SRC="$HOME/Projects/free-roster-memory/index.html"
+KAM=root@45.61.58.125
+[ -f "$SRC" ] || { echo "!! source missing: $SRC"; exit 1; }
+
+# Fingerprint the source so verification checks the RIGHT thing, not just "a title".
+FP=$(shasum -a 256 "$SRC" | cut -c1-12)
+TITLE=$(grep -oiE '<title>[^<]*</title>' "$SRC" | head -1)
+echo "source $SRC"
+echo " sha256[:12]=$FP $TITLE"
+echo
+
+push() {
+ local name="$1" repo="$2" dest="$3" remote="$4" url="$5"
+ echo "=== $name ==="
+ cp "$SRC" "$dest"
+ ( cd "$repo"
+ if git diff --quiet -- "$dest" 2>/dev/null && git diff --cached --quiet 2>/dev/null; then
+ echo " no change vs committed — re-deploying anyway"
+ else
+ git add -A && git commit -q -m "sync Emoji Memory game from free-roster-memory ($FP)" && echo " committed"
+ fi
+ rsync -az --exclude .git --exclude tests --exclude deploy ./ "$KAM:$remote/" && echo " rsynced -> $remote"
+ )
+ # verify the live copy matches the source fingerprint
+ local live_fp
+ live_fp=$(curl -s --max-time 20 "$url" | shasum -a 256 | cut -c1-12 || echo "FETCH-FAIL")
+ if [ "$live_fp" = "$FP" ]; then echo " ✅ LIVE matches source ($url)"; else echo " ⚠️ LIVE fp=$live_fp != source $FP ($url)"; fi
+ echo
+}
+
+push "games.aa" \
+ "$HOME/Projects/games-agentabrams" \
+ "$HOME/Projects/games-agentabrams/games/emoji-memory/index.html" \
+ "/var/www/games.agentabrams.com" \
+ "https://games.agentabrams.com/games/emoji-memory/index.html"
+
+push "emoji.aa" \
+ "$HOME/Projects/emoji-agentabrams" \
+ "$HOME/Projects/emoji-agentabrams/index.html" \
+ "/var/www/emoji.agentabrams.com" \
+ "https://emoji.agentabrams.com/"
+
+echo "done — cost \$0 (local copy + git + rsync)"
← eb1e20f Add light/dark theme toggle, Web Audio sound effects, and 8x
·
back to Free Roster Memory
·
add README documenting the game + push-to-both sync command 047fd1d →