aboutsummaryrefslogtreecommitdiff
path: root/aux/ci/report.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-24 11:18:40 -0300
committerEuAndreh <eu@euandre.org>2021-06-24 11:18:40 -0300
commit2539cf045c79ae1ebddccba7f887040d10e6ec1f (patch)
tree72f8f153f0880a98c4aa335e108be0c995b5b103 /aux/ci/report.sh
parentdependencies.dot: Songbooks could make money (diff)
downloadpackage-repository-2539cf045c79ae1ebddccba7f887040d10e6ec1f.tar.gz
package-repository-2539cf045c79ae1ebddccba7f887040d10e6ec1f.tar.xz
aux/: Update
Diffstat (limited to '')
-rwxr-xr-xaux/ci/report.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/aux/ci/report.sh b/aux/ci/report.sh
index e71e1ac..c873f54 100755
--- a/aux/ci/report.sh
+++ b/aux/ci/report.sh
@@ -2,12 +2,13 @@
set -eu
PROJECT="$1"
+OUTDIR="$2"
TLD="$(cat aux/tld.txt)"
PASS='✅'
FAIL='❌'
-mkdir -p public/ci-logs public/ci-data
+mkdir -p "$OUTDIR/ci-logs" "$OUTDIR/ci-data"
OUT="$(mktemp)"
chmod 644 "$OUT"
@@ -20,8 +21,8 @@ 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" > "public/ci-data/$FILENAME"
- git notes --ref=refs/notes/ci-logs show "$c" > "public/ci-logs/$FILENAME"
+ echo "$DATA" > "$OUTDIR/ci-data/$FILENAME"
+ git notes --ref=refs/notes/ci-logs show "$c" > "$OUTDIR/ci-logs/$FILENAME"
done
cat <<EOF >> "$OUT"
@@ -46,7 +47,7 @@ cat <<EOF >> "$OUT"
<ul>
EOF
-for f in $(find public/ci-data/ -type f | LANG=C.UTF-8 sort -r); do
+for f in $(find "$OUTDIR/ci-data/" -type f | LANG=C.UTF-8 sort -r); do
DATA="$(cat "$f")"
STATUS="$(echo "$DATA" | cut -d\ -f1)"
FILENAME="$(echo "$DATA" | cut -d\ -f2)"
@@ -72,4 +73,4 @@ cat <<EOF >> "$OUT"
</html>
EOF
-mv "$OUT" public/ci.html
+mv "$OUT" "$OUTDIR/ci.html"