Release / Plano (reaproveitar as imagens?) (push) Successful in 4s
Release / ci (push) Skipped
Release / Namespace das imagens (push) Successful in 1s
Release / Build auth (linux/amd64) (push) Skipped
Release / Build migrations (linux/amd64) (push) Skipped
Release / Build protocols (linux/amd64) (push) Skipped
Release / Build rspamd (linux/amd64) (push) Skipped
Release / Build storage (linux/amd64) (push) Skipped
Release / Build webmail (linux/amd64) (push) Skipped
Release / Build auth (linux/arm64) (push) Skipped
Release / Build migrations (linux/arm64) (push) Skipped
Release / Build protocols (linux/arm64) (push) Skipped
Release / Build rspamd (linux/arm64) (push) Skipped
Release / Build storage (linux/arm64) (push) Skipped
Release / Build webmail (linux/arm64) (push) Skipped
Release / Publica migrations (push) Successful in 20s
Release / Publica auth (push) Successful in 20s
Release / Publica protocols (push) Successful in 20s
Release / Publica rspamd (push) Successful in 20s
Release / Publica storage (push) Successful in 21s
Release / Publica webmail (push) Successful in 21s
Release / Cria a release no Gitea (push) Skipped
The job inherited the implicit success() and was skipped whenever the build job upstream was skipped (images reused). It now checks publish explicitly, like publish does. Notes come from the matching CHANGELOG section through scripts/release-notes.sh, not from the commit log of the whole history. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
40 lines
1.1 KiB
Bash
Executable File
40 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Prints the release notes for a tag: the images it publishes, then the matching
|
|
# section of CHANGELOG.md (the commit log since the previous tag if the changelog
|
|
# has no section for that version).
|
|
#
|
|
# scripts/release-notes.sh v1.2.3 git.example.com/owner/project
|
|
set -euo pipefail
|
|
|
|
tag=${1:?usage: release-notes.sh <tag> <image-namespace>}
|
|
namespace=${2:?usage: release-notes.sh <tag> <image-namespace>}
|
|
version=${tag#v}
|
|
|
|
echo "## Images"
|
|
echo
|
|
echo '```'
|
|
for service in protocols auth storage webmail migrations rspamd; do
|
|
echo "$namespace/$service:$version"
|
|
done
|
|
echo '```'
|
|
echo
|
|
|
|
section=""
|
|
if [ -f CHANGELOG.md ]; then
|
|
section=$(awk -v head="## [$version]" '
|
|
index($0, head) == 1 { found = 1; next }
|
|
found && /^## \[/ { exit }
|
|
found && /^\[[^]]+\]: / { next }
|
|
found { print }
|
|
' CHANGELOG.md)
|
|
fi
|
|
|
|
if [ -n "$(printf '%s' "$section" | tr -d '[:space:]')" ]; then
|
|
printf '%s\n' "$section"
|
|
else
|
|
previous=$(git describe --tags --abbrev=0 "$tag^" 2>/dev/null || true)
|
|
echo "## Changes${previous:+ since $previous}"
|
|
echo
|
|
git log --no-merges --format='- %s (%h)' "${previous:+$previous..}$tag"
|
|
fi
|