mirror of
https://gitea.com/gitea/homebrew-gitea.git
synced 2024-06-02 10:11:26 +05:30
Add homebrew for tea (#57)
* Add homebrew for tea * Update tea.rb * update per feedback * update version
This commit is contained in:
parent
4342f1c192
commit
8e1a7dcd5f
46
tea.rb
Normal file
46
tea.rb
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
require "formula"
|
||||||
|
|
||||||
|
class Tea < Formula
|
||||||
|
homepage "https://github.com/go-gitea/tea"
|
||||||
|
head "https://github.com/go-gitea/tea.git"
|
||||||
|
|
||||||
|
stable do
|
||||||
|
version "0.1.0"
|
||||||
|
url "https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-10.6-amd64"
|
||||||
|
sha256 `curl -s https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-10.6-amd64.sha256`.split(" ").first
|
||||||
|
end
|
||||||
|
|
||||||
|
devel do
|
||||||
|
url "https://dl.gitea.io/tea/master/tea-master-darwin-10.6-amd64"
|
||||||
|
sha256 `curl -s https://dl.gitea.io/tea/master/tea-master-darwin-10.6-amd64.sha256`.split(" ").first
|
||||||
|
version "master"
|
||||||
|
end
|
||||||
|
|
||||||
|
head do
|
||||||
|
url "https://github.com/go-gitea/tea.git", :branch => "master"
|
||||||
|
depends_on "go" => :build
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
system "#{bin}/tea", "--version"
|
||||||
|
end
|
||||||
|
|
||||||
|
def install
|
||||||
|
case
|
||||||
|
when build.head?
|
||||||
|
mkdir_p buildpath/File.join("src", "code.gitea.io")
|
||||||
|
ln_s buildpath, buildpath/File.join("src", "code.gitea.io", "tea")
|
||||||
|
|
||||||
|
ENV.append_path "PATH", File.join(buildpath, "bin")
|
||||||
|
|
||||||
|
ENV["GOPATH"] = buildpath
|
||||||
|
ENV["GOHOME"] = buildpath
|
||||||
|
|
||||||
|
system "cd src/code.gitea.io/tea && make build"
|
||||||
|
|
||||||
|
bin.install "#{buildpath}/tea" => "tea"
|
||||||
|
else
|
||||||
|
bin.install "#{buildpath}/tea-#{version}-darwin-10.6-amd64" => "tea"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue