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: |