Skip to content

build: produce universal macOS binary instead of separate arch builds#33

Merged
bojanrajkovic merged 1 commit intomainfrom
build/universal-macos-binary
Feb 15, 2026
Merged

build: produce universal macOS binary instead of separate arch builds#33
bojanrajkovic merged 1 commit intomainfrom
build/universal-macos-binary

Conversation

@bojanrajkovic
Copy link
Contributor

Summary

  • Add GoReleaser universal_binaries section with replace: true to combine darwin/amd64 and darwin/arm64 into a single Mach-O universal binary
  • One macOS download works on both Intel and Apple Silicon
  • Archive named cpm_<version>_darwin_universal.tar.gz instead of separate darwin_amd64 and darwin_arm64
  • Homebrew cask auto-generates a single on_macos block instead of split on_intel/on_arm

🤖 Generated with Claude Code

Use GoReleaser's universal_binaries feature with replace:true to combine
darwin/amd64 and darwin/arm64 into a single Mach-O universal binary.
Users get one macOS download that works on both Intel and Apple Silicon.

Archive naming uses "universal" instead of "all" for clarity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bojanrajkovic
Copy link
Contributor Author

Test Plan

  • goreleaser check validates config (only pre-existing deprecation warning about homebrew_casks.binary)
  • goreleaser build --snapshot --clean produces dist/cpm-universal_darwin_all/cpm as a Mach-O universal binary with both x86_64 and arm64
  • goreleaser release --snapshot --clean --skip=publish produces correct archive names:
    • cpm_<ver>_darwin_universal.tar.gz (single macOS archive)
    • cpm_<ver>_linux_amd64.tar.gz (unchanged)
    • cpm_<ver>_linux_arm64.tar.gz (unchanged)
    • cpm_<ver>_windows_amd64.zip (unchanged)
  • Generated homebrew cask (dist/homebrew/Casks/cpm.rb) has single on_macos block pointing to darwin_universal.tar.gz
  • No individual darwin_amd64 or darwin_arm64 archives are produced (confirmed by replace: true)

@bojanrajkovic bojanrajkovic merged commit 5587597 into main Feb 15, 2026
8 checks passed
@bojanrajkovic bojanrajkovic deleted the build/universal-macos-binary branch February 15, 2026 14:08
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

Comments