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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fHdm92yjvguPi2LiXfLB9
This commit is contained in:
+7
-1
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user