Skip to content

fix(ci): release verify — pipe version through head -n 1 before awk#83

Merged
amangsingh merged 1 commit into
mainfrom
fix/release-verify-head-n1
May 15, 2026
Merged

fix(ci): release verify — pipe version through head -n 1 before awk#83
amangsingh merged 1 commit into
mainfrom
fix/release-verify-head-n1

Conversation

@amangsingh
Copy link
Copy Markdown
Owner

Problem

The release verify step in .github/workflows/release.yml runs:

actual=$("$tmp/castra" version | awk '{print $2}')

castra version emits a HATEOAS Next-actions block after the version line. awk '{print $2}' without head -n 1 concatenates 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 tag job to fail on the v1.1.0-ga release run (#25928647073) with:

released binary reports version '1.1.0-ga

actions:
--sovereign
init' but expected version '1.1.0-ga'

Fix

Restore head -n 1 between version and awk:

actual=$("$tmp/castra" version | head -n 1 | awk '{print $2}')

This fix was originally applied in commit 1ae98dc on origin/main but was absent from the local release branch (DAG diverged at 7cfc7eb before 1ae98dc landed). The git merge -s ours during the v1.1.0-ga DAG unification took our version of the file, losing head -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

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.
@amangsingh amangsingh merged commit b4dfc27 into main May 15, 2026
4 of 5 checks passed
@amangsingh amangsingh deleted the fix/release-verify-head-n1 branch May 15, 2026 16:28
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