#!/bin/sh set -eu PROJECT="$1" OUTDIR="$2" TLD="$(cat aux/tld.txt)" PASS='✅' FAIL='❌' mkdir -p "$OUTDIR/ci-logs" "$OUTDIR/ci-data" OUT="$(mktemp)" chmod 644 "$OUT" git fetch origin refs/notes/ci-data:refs/notes/ci-data ||: & git fetch origin refs/notes/ci-logs:refs/notes/ci-logs ||: & git fetch origin refs/notes/commits:refs/notes/commits ||: & wait for c in $(git notes list | cut -d\ -f2); do DATA="$(git notes --ref=refs/notes/ci-data show "$c")" FILENAME="$(echo "$DATA" | cut -d\ -f2)" echo "$DATA" > "$OUTDIR/ci-data/$FILENAME" git notes --ref=refs/notes/ci-logs show "$c" > "$OUTDIR/ci-logs/$FILENAME" done cat <> "$OUT" CI logs for $PROJECT

CI logs for $PROJECT

EOF mv "$OUT" "$OUTDIR/ci.html"