commit-colors icon indicating copy to clipboard operation
commit-colors copied to clipboard

Add support for ARM64 (used on M1 Macs)

Open bryanbraun opened this issue 3 years ago • 1 comments

Currently, if you try to install commit-colors on an M1 Mac, you get an error:

image

This is caused by the following lines in the homebrew tap repo (sparkbox/homebrew-commit-colors):

on_macos do
  if Hardware::CPU.intel?
    url "https://github.com/sparkbox/commit-colors/releases/download/2.0.1/commit-colors_2.0.1_Darwin_x86_64.tar.gz"
    sha256 "0441304d3349582927c2a01069365dd35b7341a0cfb2de714636d5b45dbf8a25"
  end
end

(notice: the only if-statement under macos is Hardware::CPU.intel. We need another one for arm64 apple silicon)

Because this Homebrew formula is generated by goreleaser, it looks like the way to fix it is to add arm64 to the .goreleaser.yml file (as documented here), or to add a support for macOS Universal Binaries (as documented here).

bryanbraun avatar Feb 12 '22 23:02 bryanbraun

hi @bryanbraun I don't have an m1 mac, do you know if there's anything that needs to be done to generate that M1 binary that the url is pointing to in the if-statement you posted?

I can try to submit a PR here to resolve this, but I don't have the hardware available to me to test this.

rogeruiz avatar Nov 13 '22 16:11 rogeruiz