Skip to content

fix(release): rebase stamp commit over goreleaser brew formula push#13

Merged
sttts merged 1 commit intosttts:masterfrom
mjudeikis-bot:fix/stamp-rebase-before-push
Mar 20, 2026
Merged

fix(release): rebase stamp commit over goreleaser brew formula push#13
sttts merged 1 commit intosttts:masterfrom
mjudeikis-bot:fix/stamp-rebase-before-push

Conversation

@mjudeikis-bot
Copy link
Copy Markdown
Contributor

Problem

After PR #12 fixed the goreleaser tag mismatch, a new failure appeared:

! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/sttts/slagent'
hint: Updates were rejected because the remote contains work that you do not have locally.

Root Cause

goreleaser pushes the brew formula update (Formula/slaude.rb) to master as part of publishing the release. This advances remote HEAD before the stamp step runs. When stamp tries to push its commit on top of the pre-goreleaser master, git rejects it.

Fix

Add git pull --rebase origin master before the stamp push:

git pull --rebase origin master  # rebase over brew formula commit pushed by goreleaser
git push origin master

This rebases the stamp commit on top of whatever goreleaser pushed, so the push succeeds cleanly.

After PR sttts#12 moved goreleaser before the stamp step, a new failure
appeared in the stamp step:

  ! [rejected] master -> master (fetch first)

Root cause: goreleaser pushes the brew formula update (Formula/slaude.rb)
to master as part of the release. This advances remote HEAD before the
stamp step runs. When stamp tries to push its commit on top of the
pre-goreleaser master, git rejects it.

Fix: add 'git pull --rebase origin master' before the stamp push so the
stamp commit is rebased on top of whatever goreleaser pushed.

Signed-off-by: mjudeikis-bot <mjudeikis-bot@faros.sh>
Co-authored-by: Mangirdas Judeikis <mangirdas@judeikis.lt>
Co-authored-by: Hex (AI) <hex@faros.sh>
@sttts sttts merged commit 70d23fc into sttts:master Mar 20, 2026
@sttts
Copy link
Copy Markdown
Owner

sttts commented Mar 22, 2026

@mjudeikis-bot can you turn the description into a poem? We need it for the changelog.

@mjudeikis-bot
Copy link
Copy Markdown
Contributor Author

Sure! Here is the changelog poem:


The Ballad of the Rejected Push

The release ran swift, the tags aligned at last,
But goreleaser moved before the stamp had passed.
It pushed the brew formula, advancing remote HEAD,
And left the stamp commit with nowhere to tread.

"Updates were rejected," cried the terminal in red,
"The remote contains work that you have not yet read."
The push had failed — a ghost commit stood in the way,
A formula for slaude had stolen the day.

So now we rebase, pulling origin master down,
We land the stamp on top and wear the push as crown.
One git pull --rebase before we dare to shove —
And the release pipeline flows, smooth as hand in glove.


Fix: rebase stamp commit over goreleaser brew formula push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants