From bcac92669a4fa74ea00cb045508de1f85805ca58 Mon Sep 17 00:00:00 2001 From: Timmy Date: Sat, 18 Jul 2026 12:18:40 +0100 Subject: [PATCH] script/release: push branch and tag together so master doesn't lag the tag Previously the script pushed only the tag, leaving origin/master behind the release by the version-bump commit (the tag pointed at an unpushed commit). Push the current branch and the tag atomically with --atomic. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_019fHdm92yjvguPi2LiXfLB9 --- script/release | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/script/release b/script/release index 73aa1f3a..ae37dc86 100755 --- a/script/release +++ b/script/release @@ -281,7 +281,13 @@ echo "$RELEASE_BODY" # ── Tag & Push ───────────────────────────────────────────────── echo "==> Tagging ${TAG}..." git tag -a "$TAG" -m "Release ${TAG}" -git push origin "$TAG" + +# Push the branch (with the version-bump commit) and the tag together, so +# the remote branch never lags the release tag. --atomic means both refs +# land or neither does, avoiding a pushed tag pointing at an unpushed commit. +BRANCH="$(git rev-parse --abbrev-ref HEAD)" +echo "==> Pushing ${BRANCH} and ${TAG}..." +git push --atomic origin "$BRANCH" "$TAG" # ── Create Gitea Release ────────────────────────────────────── echo "==> Creating release on Gitea..."