From cef741faa605fffb28e505fc8f915cca5c16ca6d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 18 Feb 2021 17:24:10 -0300 Subject: Add aux/ci/report.sh --- aux/ci/report.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 aux/ci/report.sh (limited to 'aux/ci/report.sh') diff --git a/aux/ci/report.sh b/aux/ci/report.sh new file mode 100755 index 0000000..b82c061 --- /dev/null +++ b/aux/ci/report.sh @@ -0,0 +1,69 @@ +#!/bin/sh +set -eu + +PROJECT_UC="$1" + +PASS='✅' +FAIL='❌' + +mkdir -p public/ci-logs public/ci-data + +OUT="$(mktemp)" +chmod 644 "$OUT" + +git fetch origin refs/notes/*:refs/notes/* ||: + +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" > "public/ci-data/$FILENAME" + git notes --ref=refs/notes/ci-logs show "$c" > "public/ci-logs/$FILENAME" +done + +cat <> "$OUT" + + + + + + + + + +

+ CI logs for $PROJECT_UC +

+ + + +EOF + +mv "$OUT" public/ci.html -- cgit v1.2.3