From e6ac5246bc546c6eb78a6c338769ebda4f09aca8 Mon Sep 17 00:00:00 2001 From: Arlind Date: Mon, 30 Jun 2025 12:55:03 +0200 Subject: [PATCH] Update .gitea/workflows/ci.yml --- .gitea/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 184c5c8..e4d6edc 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -853,6 +853,28 @@ jobs: echo "## Mod Icons" echo "![](/media/icons/${base_path}-mod-icons.webp)" + + echo "" + echo "## Build History" + echo "" + echo "| Version | Date |" + echo "| ------- | ---- |" + + current_commit_date=$(TZ="Europe/Zurich" date -d "$(git log -1 --format=%cI)" "+%d.%m.%Y %H:%M:%S") + echo "| [\`$new_tag (Current)\`]($REGISTRY_URL/$USER_REPOSITORY/src/tag/$new_tag/docs/${base_path}.md) | $current_commit_date |" + + old_tags=$(git tag --sort=-v:refname | grep -v "^$new_tag$" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || true) + if [ -n "$old_tags" ]; then + echo "$old_tags" | while read -r tag; do + raw_osk_path="export/${skin}/${skin_header}.osk" + if git ls-tree -r --name-only "$tag" | grep -Fx -- "$raw_osk_path" >/dev/null; then + tag_date=$(git log -1 --format=%ci "$tag") + formatted_date=$(TZ="Europe/Zurich" date -d "$tag_date" "+%d.%m.%Y %H:%M:%S") + echo "| [\`$tag\`]($REGISTRY_URL/$USER_REPOSITORY/src/tag/$tag/docs/${base_path}.md) | $formatted_date |" + fi + done + fi + } > "$md_file_path" echo " → Wrote $md_file_path"