tea: enable arm64 architecture (#130)
We have builds for arm64 since https://gitea.com/gitea/tea/pulls/360. Reviewed-on: https://gitea.com/gitea/homebrew-gitea/pulls/130 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Norwin <noerw@noreply.gitea.io> Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
parent
dacc7d87e6
commit
f915816b85
27
tea.rb
27
tea.rb
|
@ -4,16 +4,33 @@ class Tea < Formula
|
|||
homepage "https://gitea.com/gitea/tea"
|
||||
head "https://gitea.com/gitea/tea.git"
|
||||
|
||||
def self.bin_filename(version)
|
||||
os = OS.mac? ? "darwin" : "linux"
|
||||
|
||||
arch = case Hardware::CPU.arch
|
||||
when :x86_64 then "amd64"
|
||||
when :arm64 then "arm64"
|
||||
else
|
||||
raise "tea: Unsupported system architecture #{Hardware::CPU.arch}"
|
||||
end
|
||||
|
||||
"tea-#{version}-#{os}-#{arch}"
|
||||
end
|
||||
|
||||
def self.bin_url(version)
|
||||
"https://dl.gitea.io/tea/#{version}/#{bin_filename(version)}"
|
||||
end
|
||||
|
||||
stable do
|
||||
version "0.7.0"
|
||||
url "https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-amd64"
|
||||
sha256 `curl -sL https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-amd64.sha256`.split(" ").first
|
||||
url Tea.bin_url(version)
|
||||
sha256 `curl -sL ${url}.sha256`.split(" ").first
|
||||
end
|
||||
|
||||
head do
|
||||
version "master"
|
||||
url "https://dl.gitea.io/tea/master/tea-master-darwin-amd64"
|
||||
sha256 `curl -sL https://dl.gitea.io/tea/master/tea-master-darwin-amd64.sha256`.split(" ").first
|
||||
url Tea.bin_url(version)
|
||||
sha256 `curl -sL ${url}.sha256`.split(" ").first
|
||||
end
|
||||
|
||||
head do
|
||||
|
@ -40,7 +57,7 @@ class Tea < Formula
|
|||
|
||||
bin.install "#{buildpath}/tea" => "tea"
|
||||
else
|
||||
bin.install "#{buildpath}/tea-#{version}-darwin-amd64" => "tea"
|
||||
bin.install "#{buildpath}/#{Tea.bin_filename(version)}" => "tea"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue