aboutsummaryrefslogtreecommitdiff
path: root/ci-gen-index.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci-gen-index.sh')
-rwxr-xr-xci-gen-index.sh70
1 files changed, 0 insertions, 70 deletions
diff --git a/ci-gen-index.sh b/ci-gen-index.sh
deleted file mode 100755
index 4de179c..0000000
--- a/ci-gen-index.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env bash
-set -Eeuo pipefail
-cd "$(dirname "${BASH_SOURCE[0]}")"
-
-printf "Generating index.html of build logs... "
-rm -f index.html
-
-cat <<EOF >> index.html
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
-
- <style>
- pre {
- display: inline;
- }
- </style>
- </head>
- <body>
- <h1>
- Build logs
- </h1>
-EOF
-
-PASS='✅'
-FAIL='❌'
-DUNNO='❔'
-
-for dir in */; do
- d="${dir%/}"
- cat <<EOF >> index.html
- <h2 id="$d">
- <a href="#$d">
- $dir
- </a>
- </h2>
- <ul>
-EOF
- for file in "$d"/*; do
- REPORT="$(grep '>>>' "$file" ||:)"
- if [[ -z "$REPORT" ]]; then
- STATUS="$DUNNO"
- elif grep '>>> exit status was 0' <(echo "$REPORT") > /dev/null; then
- STATUS="$PASS"
- else
- STATUS="$FAIL"
- fi
- cat <<EOF >> index.html
- <li>
- <a href="$file">
- $STATUS
- <pre>$file</pre>
- </a>
- </li>
-EOF
- done
-
- cat <<EOF >> index.html
- </ul>
-EOF
-done
-
-cat <<EOF >> index.html
- </body>
-</html>
-EOF
-
-echo "done."