Skip to content

Run GoReleaser manifest backup cleanup as a separate hook - #18

Merged
intel352 merged 1 commit into
mainfrom
fix/goreleaser-hook-cleanup-20261130-4f18933e
Nov 30, 2026
Merged

intel352 merged 1 commit into
mainfrom
fix/goreleaser-hook-cleanup-20261130-4f18933e

Conversation

@intel352

Copy link
Copy Markdown
Contributor

GoReleaser v2.20.3 executes hooks directly, not through a shell. The original sed … && rm … hook rewrites plugin.json but leaves its backup. Make cleanup a separate hook so it runs after a successful rewrite and a cleanup error propagates.

Exact head c9fbd1636a8f589de1bdf0268d3225beb3d8057d against ed804b415ed42f8d6b0a12cea5b1c9bac96be0ce. Checksum-qualified GoReleaser v2.20.3 on isolated Linux passed eight logical fixture cases; the untouched original reproduced four expected failures. The fixture applies actual before-hooks with application builds disabled. No full packaging, dependency qualification, tag, release, deployment or hosted validation is claimed.

GoReleaser parses before hooks as commands, so the shell cleanup suffix
was not executed. Run backup removal as its own hook and propagate errors.

Add a layout guard and opt-in native-engine regression coverage for
manifest rewriting, cleanup, repeatability and baseline failure controls.
Qualified locally with GoReleaser v2.20.3: eight cases pass and the original
configuration fails four regression assertions. This does not qualify the
full release, platform builds or hosted behavior.
@intel352
intel352 marked this pull request as ready for review November 30, 2026 02:17
@intel352
intel352 merged commit a6ebe26 into main Nov 30, 2026
4 checks passed
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