1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-09 13:36:56 +02:00
Ryan Currah f734b503d4
feat(pipe/brew): install amd64 binaries when no arm64 binaries present (#2939)
Currently on a M1 macbook when adding a tap with formulas that only support amd64 it fails to add the tap. This prevents new arm64 users from using the tap. By allowing arm64 users to install an amd64 binary if no arm64 binary is avialable will atleast allow the user to use the tap.
2022-02-25 21:57:46 -03:00

71 lines
1.6 KiB
Plaintext

# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class MultipleArmv5 < Formula
desc "A run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser"
version "1.0.1"
on_macos do
url "https://dummyhost/download/v1.0.1/bin.tar.gz"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install
bin.install "multiple_armv5"
end
if Hardware::CPU.arm?
def caveats
<<~EOS
The darwin_arm64 architecture is not supported for the MultipleArmv5
formula at this time. The darwin_amd64 binary may work in compatibility
mode, but it might not be fully supported.
EOS
end
end
end
on_linux do
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://dummyhost/download/v1.0.1/arm64.tar.gz"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install
bin.install "multiple_armv5"
end
end
if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit?
url "https://dummyhost/download/v1.0.1/armv5.tar.gz"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install
bin.install "multiple_armv5"
end
end
end
depends_on "zsh"
depends_on "bash" => :recommended
conflicts_with "gtk+"
conflicts_with "qt"
def caveats; <<~EOS
don't do this multiple_armv5
EOS
end
plist_options :startup => false
def plist; <<~EOS
<xml>whatever</xml>
EOS
end
test do
system "true"
system "#{bin}/foo -h"
end
end