From ae0f31d36edd9667bffa9f390ba0d38bf44ff908 Mon Sep 17 00:00:00 2001 From: fithwum Date: Mon, 7 Jul 2025 06:16:13 -0700 Subject: [PATCH] update workflow to correct errors --- .gitea/workflows/base-build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/base-build.yml b/.gitea/workflows/base-build.yml index c3f0ac9..7735ce2 100644 --- a/.gitea/workflows/base-build.yml +++ b/.gitea/workflows/base-build.yml @@ -121,14 +121,19 @@ jobs: changelog="${{ matrix.version }}/CHANGES.md" mkdir -p "$(dirname "$changelog")" touch "$changelog" + infofile="${{ matrix.version }}/build-info.json" last_commit="" - [ -f "$infofile" ] && last_commit=$(jq -r '.commit' "$infofile") + if [ -f "$infofile" ]; then + last_commit=$(jq -r '.commit' "$infofile") + fi + echo -e "\n## $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$changelog" if [ -n "$last_commit" ]; then git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" | head -n 10 >> "$changelog" else git log -n 10 --pretty=format:"- %s (%an)" >> "$changelog" + fi - name: Commit and push changelog run: |