From b2289874692800d0dc26158991531b1ce3ead984 Mon Sep 17 00:00:00 2001 From: moilanik Date: Thu, 18 Jun 2026 08:50:13 +0300 Subject: [PATCH] =?UTF-8?q?=C3=A4=C3=A4h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/publish-git-pages.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/scripts/publish-git-pages.sh b/scripts/publish-git-pages.sh index df8d411..acee12c 100755 --- a/scripts/publish-git-pages.sh +++ b/scripts/publish-git-pages.sh @@ -33,6 +33,41 @@ else fi mkdir -p "$TARGET" cp -a "$REPORT_DIR/." "$TARGET/" +if [ ! -f "$TARGET/index.html" ]; then + items=() + while IFS= read -r -d '' f; do + items+=("$(basename "$f")") + done < <(find "$TARGET" -maxdepth 1 -type f ! -name index.html -print0 2>/dev/null || true) + while IFS= read -r -d '' d; do + name=$(basename "$d") + [ -f "$d/index.html" ] && items+=("$name") + done < <(find "$TARGET" -maxdepth 1 -type d ! -name . -print0 2>/dev/null || true) + + if [ ${#items[@]} -gt 1 ]; then + { + echo '' + echo "Test report ${SHA8}" + echo '' + echo "

Test report ${SHA8}

' + } > "$TARGET/index.html" + fi +fi + cat > "$TARGET/.meta" <