Skip to content

fix: set universal_binaries name_template to match build binary name#203

Merged
jmeridth merged 1 commit intomainfrom
fix/universal-binary-name
Mar 14, 2026
Merged

fix: set universal_binaries name_template to match build binary name#203
jmeridth merged 1 commit intomainfrom
fix/universal-binary-name

Conversation

@jmeridth
Copy link
Member

What

Set the name_template field on universal_binaries in .goreleaser.yaml to "pvtr" so the macOS universal binary matches the configured build binary name.

Why

The universal_binaries name_template defaults to {{ .ProjectName }}, which resolves to the repo name "privateer". With replace: true, this overwrites the correctly named "pvtr" binary with one named "privateer", causing brew install privateerproj/tap/pvtr to fail with ENOENT: No such file or directory - pvtr since the formula expects a binary named "pvtr".

Notes

  • A new release must be cut after this merges for the homebrew formula to work
  • The archive filenames will still use "privateer" (e.g., privateer_Darwin_all.tar.gz) since ProjectName is unchanged — only the binary inside is affected

## What

Set the name_template field on universal_binaries in .goreleaser.yaml to "pvtr" so the macOS universal binary matches the configured build binary name.

## Why

The universal_binaries name_template defaults to {{ .ProjectName }}, which resolves to the repo name "privateer". With replace: true, this overwrites the correctly named "pvtr" binary with one named "privateer", causing brew install to fail with ENOENT since the formula expects "pvtr".

## Notes

- A new release must be cut after this merges for the homebrew formula to work
- The archive filenames will still use "privateer" (e.g., privateer_Darwin_all.tar.gz) since ProjectName is unchanged — only the binary inside is affected

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth requested a review from a team as a code owner March 14, 2026 21:42
Copilot AI review requested due to automatic review settings March 14, 2026 21:42
@github-actions github-actions bot added the fix label Mar 14, 2026
@jmeridth jmeridth self-assigned this Mar 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates GoReleaser’s macOS universal binary naming so the produced universal binary matches the configured build/brew binary name (pvtr) instead of defaulting to the repository/project name (privateer), preventing Homebrew install failures.

Changes:

  • Set universal_binaries.name_template to pvtr to avoid the default {{ .ProjectName }} name when replace: true.
  • Added inline documentation explaining why the override is necessary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jmeridth jmeridth merged commit 013a03b into main Mar 14, 2026
15 checks passed
@jmeridth jmeridth deleted the fix/universal-binary-name branch March 14, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants