Skip to content

fix(release): wrap goreleaser before-hooks in sh -c#133

Merged
aksOps merged 1 commit into
mainfrom
fix/goreleaser-before-hooks
May 13, 2026
Merged

fix(release): wrap goreleaser before-hooks in sh -c#133
aksOps merged 1 commit into
mainfrom
fix/goreleaser-before-hooks

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 13, 2026

Summary

The v1.0.0 release workflow (run #25778329702) failed immediately at the first goreleaser before-hook:

```
error=exec: "cd": executable file not found in $PATH
cmd=cd
```

goreleaser runs each `before.hooks` entry via Go's `exec.Command` — no shell interpretation. `cd go && go mod download` becomes `binary=cd, args=[go, &&, go, mod, download]`, and exec can't find a `cd` binary.

Fix: wrap each hook in `sh -c "…"` so the working-directory change + `&&` chain run in a real shell.

After merge, retag v1.0.0 to re-fire the release.

Test plan

  • yaml-lint of `.goreleaser.yml` passes
  • After merge: delete v1.0.0 tag (git push --delete origin v1.0.0), re-tag from new HEAD, push tag — workflow should make it past the hooks

The v1.0.0 release run (workflow #25778329702) failed at the very
first hook with:

    error=exec: "cd": executable file not found in $PATH
    cmd=cd

Root cause: goreleaser's `before.hooks` runs each entry via Go's
exec.Command — no shell interpretation. `cd go && go mod download`
gets parsed as binary="cd", args=["go", " && ", "go", "mod", "download"],
and exec can't find a `cd` binary.

Fix: wrap each hook in `sh -c "…"` so the working-directory change
and `&&` chain run inside a real shell.

After this lands, retag v1.0.0 to re-fire the release workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aksOps aksOps merged commit 7f32aa4 into main May 13, 2026
14 checks passed
@aksOps aksOps deleted the fix/goreleaser-before-hooks branch May 13, 2026 04:34
aksOps added a commit that referenced this pull request May 13, 2026
The v1.0.0 release flow burned (goreleaser before-hook bug, fixed in
#133 but the tag itself was already pushed pointing at a commit that
can't build). Rather than force-update v1.0.0, ship v0.3.0 cleanly
from the fix commit and treat v1.0.0 as a one-off SemVer hole.

Renames v1.0.0 → v0.3.0 in CHANGELOG.md, CLAUDE.md, PROJECT_SUMMARY.md.
The "v1.1.0 removal target" for the deprecated 34 MCP tools becomes
"a future minor" — pinning the removal version isn't worth the
churn given we're not yet at 1.x.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant