feat: show commits since last release in changelog
All checks were successful
Build & Push CI Image / build-and-push (push) Successful in 10m22s
🚀 Lint & Test & Deploy / release (push) Successful in 5m23s

This commit is contained in:
2026-02-07 15:57:19 +01:00
parent 92223c21f8
commit 1ccdb04099
2 changed files with 14 additions and 1 deletions

View File

@@ -13,6 +13,14 @@ if [[ -z "$BRANCH" && "$REF_TYPE" == "branch" ]]; then
BRANCH="$REF_NAME" BRANCH="$REF_NAME"
fi fi
# Determine last tag and commits since
LAST_TAG="$(git describe --tags --abbrev=0 2>/dev/null || true)"
if [[ -n "$LAST_TAG" ]]; then
COMMITS_SINCE_LAST_RELEASE="$(git rev-list --count "${LAST_TAG}..HEAD")"
else
COMMITS_SINCE_LAST_RELEASE="0"
fi
cat >app/static/git.json <<EOF cat >app/static/git.json <<EOF
{ {
"ref": "${GITHUB_REF:-}", "ref": "${GITHUB_REF:-}",
@@ -25,7 +33,8 @@ cat >app/static/git.json <<EOF
"job": "${GITHUB_JOB:-}", "job": "${GITHUB_JOB:-}",
"commit_message": "$(git log -1 --pretty=%B)", "commit_message": "$(git log -1 --pretty=%B)",
"commit_timestamp": "$(git log -1 --pretty=%cI)", "commit_timestamp": "$(git log -1 --pretty=%cI)",
"branch": "${BRANCH}" "branch": "${BRANCH}",
"commits_since_last_release": "${COMMITS_SINCE_LAST_RELEASE}"
} }
EOF EOF

View File

@@ -74,6 +74,10 @@
<strong>Commit:</strong> <strong>Commit:</strong>
{git.sha.slice(0, 7)} {git.commit_message} {git.sha.slice(0, 7)} {git.commit_message}
</p> </p>
<p>
<strong>Commits since last release:</strong>
{git.commits_since_last_release}
</p>
<p> <p>
<strong>Timestamp:</strong> <strong>Timestamp:</strong>
{new Date(git.commit_timestamp).toLocaleString()} {new Date(git.commit_timestamp).toLocaleString()}