Last active
March 5, 2022 10:29
-
-
Save brownhash/149e37c7014a9b8a310b2aa7b009b842 to your computer and use it in GitHub Desktop.
Public HomeBrew tap formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# formula/tool.rb | |
class ToolName < Formula | |
desc "tool description" | |
homepage "https://github.com/owner/repository" | |
version "1.0.0" | |
# For MacOs Intel based systems | |
if OS.mac? && Hardware::CPU.intel? | |
url "https://github.com/owner/repository/releases/download/v1.0.0/tool_darwin_amd64.tar.gz" | |
sha256 "fa49007fc8c3fef09c023352c3703469422e3e4d87e252142135c4617155bf43" | |
end | |
# For MacOs M1 based systems | |
if OS.mac? && Hardware::CPU.arm? | |
url "https://github.com/owner/repository/releases/download/v1.0.0/tool_darwin_arm64.tar.gz" | |
sha256 "4c5d45c7ad41cd217aa9f1bc7654921161a2554cb3e5084f3188ffd347ccc7b9" | |
end | |
# For Linux X64 based systems | |
if OS.linux? && Hardware::CPU.intel? | |
url "https://github.com/owner/repository/releases/download/v1.0.0/tool_linux_amd64.tar.gz" | |
sha256 "801e95a44248765a111qab0d650321f286cd6bf506c88ae571db3d0624dac37e" | |
end | |
def install | |
bin.install "tool" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment