fix(ci): release verify — pipe version through head -n 1 before awk#83
Merged
Conversation
castra version emits a HATEOAS Next-actions block after the version
line. Without head -n 1, awk '{print $2}' concatenates field-2 from
every output line, producing a multi-line string that fails the
equality check against $VERSION.
Restores the fix originally applied in 1ae98dc (on origin/main) that
was missing from the local branch due to DAG divergence at 7cfc7eb.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The release verify step in
.github/workflows/release.ymlruns:actual=$("$tmp/castra" version | awk '{print $2}')castra versionemits a HATEOAS Next-actions block after the version line.awk '{print $2}'withouthead -n 1concatenates field-2 from every output line, producing a multi-line string that fails the equality check against$VERSION.This caused the
Verify released binary matches tagjob to fail on the v1.1.0-ga release run (#25928647073) with:Fix
Restore
head -n 1betweenversionandawk:actual=$("$tmp/castra" version | head -n 1 | awk '{print $2}')This fix was originally applied in commit
1ae98dconorigin/mainbut was absent from the local release branch (DAG diverged at7cfc7ebbefore1ae98dclanded). Thegit merge -s oursduring the v1.1.0-ga DAG unification took our version of the file, losinghead -n 1.Note
GoReleaser itself succeeded for v1.1.0-ga. The released binary is correct. Only the post-release CI verification step failed.
🤖 Generated with Claude Code