mirror of
https://gitea.com/gitea/homebrew-gitea.git
synced 2024-06-02 10:11:26 +05:30
f3c101b039
Update to 1.11.3 Update to Gitea 1.11.3 release Reviewed-on: https://gitea.com/gitea/homebrew-gitea/pulls/88 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: John Olheiser <john.olheiser@gmail.com>
48 lines
1.3 KiB
Ruby
48 lines
1.3 KiB
Ruby
require "formula"
|
|
|
|
class Gitea < Formula
|
|
homepage "https://github.com/go-gitea/gitea"
|
|
head "https://github.com/go-gitea/gitea.git"
|
|
|
|
stable do
|
|
version "1.11.3"
|
|
url "https://dl.gitea.io/gitea/#{version}/gitea-#{version}-darwin-10.6-amd64"
|
|
sha256 `curl -s https://dl.gitea.io/gitea/#{version}/gitea-#{version}-darwin-10.6-amd64.sha256`.split(" ").first
|
|
end
|
|
|
|
devel do
|
|
url "https://dl.gitea.io/gitea/master/gitea-master-darwin-10.6-amd64"
|
|
sha256 `curl -s https://dl.gitea.io/gitea/master/gitea-master-darwin-10.6-amd64.sha256`.split(" ").first
|
|
version "master"
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/go-gitea/gitea.git", :branch => "master"
|
|
depends_on "go" => :build
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/gitea", "--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", "gitea")
|
|
|
|
ENV.append_path "PATH", File.join(buildpath, "bin")
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
ENV["GOHOME"] = buildpath
|
|
ENV["TAGS"] = "bindata sqlite sqlite_unlock_notify"
|
|
|
|
system "cd src/code.gitea.io/gitea && make build"
|
|
|
|
bin.install "#{buildpath}/gitea" => "gitea"
|
|
else
|
|
bin.install "#{buildpath}/gitea-#{version}-darwin-10.6-amd64" => "gitea"
|
|
end
|
|
end
|
|
end
|