scripts : make-release-desc - link previous release in changelog title (#29336)

make-release-desc.sh now emits "Changelog since [vX.Y.Z](<repo>/releases/tag/vX.Y.Z)"
instead of a plain version string, so the release notes link back to the previous release.

The repo URL is derived from the origin remote (SSH or HTTPS); if it cannot be
resolved (local run without origin), the title falls back to plain text.

Assisted-by: pi:llama.cpp/Qwen3.8-27B
This commit is contained in:
Georgi Gerganov 2026-09-24 07:46:38 +03:00 • committed by GitHub
parent bd4f514db1
commit 013b31c03c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,15 @@ if ! git fetch --tags origin 2>/dev/null; then
echo "Warning: could not fetch tags from origin (local run?)"
fi
# Canonical https URL of this repository (from the origin remote), used to link the previous release.
# Left empty on local runs without an origin remote.
if ORIGIN_URL="$(git remote get-url origin 2>/dev/null)"; then
REPO_URL="https://$(printf '%s' "${ORIGIN_URL}" \
| sed -E -e 's#^git@([^:]+):#https://\1/#' -e 's#^https?://##' -e 's#\.git$##')"
else
REPO_URL=""
fi
# Release commit: the commit <version> points at when the tag exists, HEAD otherwise.
if ! RELEASE_COMMIT="$(git rev-parse -q --verify "refs/tags/${VERSION}^{commit}" 2>/dev/null)"; then
RELEASE_COMMIT="$(git rev-parse HEAD)"
@ -53,7 +62,11 @@ PREV="$( { git tag --list; echo "${VERSION}"; } \
if [[ -n "${PREV}" ]]; then
CHANGELOG="$(git log --oneline "${PREV}..${RELEASE_COMMIT}")"
CHANGELOG_TITLE="Changelog since ${PREV}"
if [[ -n "${REPO_URL}" ]]; then
CHANGELOG_TITLE="Changelog since [${PREV}](${REPO_URL}/releases/tag/${PREV})"
else
CHANGELOG_TITLE="Changelog since ${PREV}"
fi
else
CHANGELOG="(no previous release tag found)"
CHANGELOG_TITLE="Changelog"