Skip to content

Commit

Permalink
docs: Homebrew README example formula (#2921)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Feb 20, 2022
1 parent d6813ce commit 6ec6907
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions www/docs/customization/homebrew.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,24 @@ class Program < Formula
homepage "https://github.com/user/repo"
version "v1.2.3"

if os.Mac?
on_macos do
url "https://github.com/user/repo/releases/download/v1.2.3/program_v1.2.3_macOs_64bit.zip"
sha256 "9ee30fc358fae8d248a2d7538957089885da321dca3f09e3296fe2058e7fff74"
end
if OS.linux? && Hardware::CPU.intel?
url "https://github.com/user/repo/releases/download/v1.2.3/program_v1.2.3_Linux_64bit.zip"
sha256 "b41bebd25fd7bb1a67dc2cd5ee12c9f67073094567fdf7b3871f05fd74a45fdd"
end
if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit?
url "https://github.com/user/repo/releases/download/v1.2.3/program_v1.2.3_Linux_armv7.zip"
sha256 "78f31239430eaaec01df783e2a3443753a8126c325292ed8ddb1658ddd2b401d"
end
if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/user/repo/releases/download/v1.2.3/program_v1.2.3_Linux_arm64.zip"
sha256 "97cadca3c3c3f36388a4a601acf878dd356d6275a976bee516798b72bfdbeecf"

on_linux
if Hardware::CPU.intel?
url "https://github.com/user/repo/releases/download/v1.2.3/program_v1.2.3_Linux_64bit.zip"
sha256 "b41bebd25fd7bb1a67dc2cd5ee12c9f67073094567fdf7b3871f05fd74a45fdd"
end
if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit?
url "https://github.com/user/repo/releases/download/v1.2.3/program_v1.2.3_Linux_armv7.zip"
sha256 "78f31239430eaaec01df783e2a3443753a8126c325292ed8ddb1658ddd2b401d"
end
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/user/repo/releases/download/v1.2.3/program_v1.2.3_Linux_arm64.zip"
sha256 "97cadca3c3c3f36388a4a601acf878dd356d6275a976bee516798b72bfdbeecf"
end
end

depends_on "git"
Expand Down

0 comments on commit 6ec6907

Please sign in to comment.