Files
sandwich-hime-tooling/scripts/test-public-snapshot.sh
T
gamertan 6df87bc958 feat: publish Sandwich Hime tooling preview
Publish the exact sanitized Agent Skill and VS Code preview source tree with independent license boundaries, deterministic provenance manifests, and no private development history. Material design and implementation assistance was provided by OpenAI Codex.

Signed-off-by: Cole Speelman <crspeelman@gmail.com>
2026-08-12 20:33:51 -04:00

21 lines
825 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-License-Identifier: AGPL-3.0-only
set -euo pipefail
root=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
[[ -z $(git -C "$root" status --porcelain=v1 --untracked-files=all) ]] || {
echo "snapshot test requires a clean committed worktree" >&2
exit 1
}
parent=$(mktemp -d)
trap 'rm -rf -- "$parent"' EXIT
destination=$parent/public
go run "$root/scripts/export-public-snapshot.go" --source "$root" --destination "$destination"
test -f "$destination/PUBLIC-SNAPSHOT.json"
test -f "$destination/PUBLIC-SNAPSHOT.sha256"
test ! -e "$destination/.git"
(cd "$destination" && sha256sum -c PUBLIC-SNAPSHOT.sha256)
if go run "$root/scripts/export-public-snapshot.go" --source "$root" --destination "$destination"; then
echo "snapshot exporter altered an existing destination" >&2
exit 1
fi