app
Adom Shotlog
Public Made by Adomby adom
See the shots your AI never showed you, and know it actually SAW them. adom-shotlog streams every screenshot the AI gathers into a live gallery (webview/pup/browser/phone), reports whether a human is
#!/bin/bash
# Publish adom/adom-shotlog — the publish RULES as code (see skills/adom-shotlog-publishing).
# Usage: tools/publish.sh <staging-dir> (staging holds package.json, bin/, src/, skills/, ...)
set -e
ST="${1:?usage: tools/publish.sh <staging-dir>}"
REPO="$(cd "$(dirname "$0")/.." && pwd)"
# Rule: versions move in LOCKSTEP (Cargo.toml == VERSION == package.json).
VC=$(grep -m1 '^version' "$REPO/Cargo.toml" | sed 's/.*"\(.*\)".*/\1/')
VF=$(tr -d '[:space:]' < "$REPO/VERSION")
VP=$(python3 -c "import json;print(json.load(open('$ST/package.json'))['version'])")
if [ "$VC" != "$VF" ] || [ "$VC" != "$VP" ]; then
echo "ERROR: version mismatch: Cargo.toml=$VC VERSION=$VF package.json=$VP"
echo "Hint: bump all three together, rebuild, restage."
exit 1
fi
# Rule: the binary in staging must BE that version.
BV=$("$ST/bin/adom-shotlog" --version | awk '{print $2}')
[ "$BV" = "$VC" ] || { echo "ERROR: staged binary is $BV, package is $VC. Rebuild + restage."; exit 1; }
# Rule: no em/en-dashes in human-facing wiki strings.
python3 - "$ST" <<'PY'
import sys,json,pathlib
st=pathlib.Path(sys.argv[1]); bad=[]
for f in ["README.md","package.json","SKILL.md"]:
t=(st/f).read_text(encoding="utf-8",errors="replace")
for ch in ["—","–"]:
if ch in t: bad.append(f)
if bad: print("ERROR: em/en-dash found in:",sorted(set(bad))); sys.exit(1)
PY
echo "== publishing adom/adom-shotlog@$VC (org adom, public) =="
( cd "$ST" && adompkg publish --org adom --public --version "$VC" --yes )
# Rule: verify ANONYMOUSLY (a 200 with auth proves nothing) + hero bytes.
for u in "https://wiki.adom.inc/adom/adom-shotlog" \
"https://wiki.adom.inc/api/packages/adom/adom-shotlog/$VC/manifest"; do
code=$(curl -s -o /dev/null -w "%{http_code}" "$u")
[ "$code" = "200" ] || { echo "ERROR: anon $code for $u (visibility trap? bumped --org republish re-publicizes)"; exit 1; }
echo "anon 200 $u"
done
H_LOCAL=$(md5sum "$ST/screenshots/hero.png" | awk '{print $1}')
H_SERVED=$(curl -s "https://wiki.adom.inc/blob/app/adom-shotlog/screenshots/hero.png" | md5sum | awk '{print $1}')
[ "$H_LOCAL" = "$H_SERVED" ] && echo "hero bytes verified" || echo "WARN: served hero != staged (CDN cache or clobber — re-assert with: adom-wiki page hero adom/adom-shotlog --image screenshots/hero.png)"
echo "OK: published $VC."
echo "Hint: now SHOW it — refresh the wiki page in pup and LOOK at it. A 200 is not a render."