Merge pull request #4 from go-gitea/stable-devel-head
Make stable/devel/head installable
This commit is contained in:
Коммит
b4e91566ca
20
gitea.rb
20
gitea.rb
|
@ -5,20 +5,19 @@ class Gitea < Formula
|
|||
head "https://github.com/go-gitea/gitea.git"
|
||||
|
||||
stable do
|
||||
url "http://dl.gitea.io/gitea/1.0.0/gitea-1.0.0-darwin-10.6-amd64"
|
||||
sha256 `curl -Ls http://dl.gitea.io/gitea/1.0.0/gitea-1.0.0-darwin-10.6-amd64.sha256`.split(" ").first
|
||||
version "1.0.0"
|
||||
url "https://dl.gitea.io/gitea/1.0.1/gitea-1.0.1-darwin-10.6-amd64"
|
||||
sha256 `curl -s https://dl.gitea.io/gitea/1.0.1/gitea-1.0.1-darwin-10.6-amd64.sha256`.split(" ").first
|
||||
version "1.0.1"
|
||||
end
|
||||
|
||||
devel do
|
||||
url "http://dl.gitea.io/gitea/master/gitea-master-darwin-10.6-amd64"
|
||||
sha256 `curl -Ls http://dl.gitea.io/gitea/master/gitea-master-darwin-10.6-amd64.sha256`.split(" ").first
|
||||
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
|
||||
|
||||
|
@ -27,7 +26,8 @@ class Gitea < Formula
|
|||
end
|
||||
|
||||
def install
|
||||
if build.head?
|
||||
case
|
||||
when build.head?
|
||||
mkdir_p buildpath/File.join("src", "code.gitea.io")
|
||||
ln_s buildpath, buildpath/File.join("src", "code.gitea.io", "gitea")
|
||||
|
||||
|
@ -35,12 +35,12 @@ class Gitea < Formula
|
|||
|
||||
ENV["GOPATH"] = buildpath
|
||||
ENV["GOHOME"] = buildpath
|
||||
ENV["TAGS"] = "sqlite"
|
||||
ENV["TAGS"] = "bindata sqlite tidb"
|
||||
|
||||
system "cd src/code.gitea.io/gitea && make build"
|
||||
system "cd src/code.gitea.io/gitea && make generate build"
|
||||
|
||||
bin.install "#{buildpath}/gitea" => "gitea"
|
||||
elsif build.devel?
|
||||
when build.devel?
|
||||
bin.install "#{buildpath}/gitea-master-darwin-10.6-amd64" => "gitea"
|
||||
else
|
||||
bin.install "#{buildpath}/gitea-1.0.0-darwin-10.6-amd64" => "gitea"
|
||||
|
|
21
lgtm.rb
21
lgtm.rb
|
@ -5,22 +5,20 @@ class Lgtm < Formula
|
|||
head "https://github.com/go-gitea/lgtm.git"
|
||||
|
||||
stable do
|
||||
url "http://dl.gitea.io/lgtm/1.0.0/lgtm-1.0.0-darwin-amd64"
|
||||
sha256 `curl -s http://dl.gitea.io/lgtm/1.0.0/lgtm-1.0.0-darwin-amd64.sha256`.split(" ").first
|
||||
url "https://dl.gitea.io/lgtm/1.0.0/lgtm-1.0.0-darwin-10.6-amd64"
|
||||
sha256 `curl -s https://dl.gitea.io/lgtm/1.0.0/lgtm-1.0.0-darwin-10.6-amd64.sha256`.split(" ").first
|
||||
version "1.0.0"
|
||||
end
|
||||
|
||||
devel do
|
||||
url "http://dl.gitea.io/lgtm/master/lgtm-master-darwin-amd64"
|
||||
sha256 `curl -s http://dl.gitea.io/lgtm/master/lgtm-master-darwin-amd64.sha256`.split(" ").first
|
||||
url "https://dl.gitea.io/lgtm/master/lgtm-master-darwin-10.6-amd64"
|
||||
sha256 `curl -s https://dl.gitea.io/lgtm/master/lgtm-master-darwin-10.6-amd64.sha256`.split(" ").first
|
||||
version "master"
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://github.com/go-gitea/lgtm.git", :branch => "master"
|
||||
|
||||
depends_on "go" => :build
|
||||
depends_on "git" => :build
|
||||
end
|
||||
|
||||
test do
|
||||
|
@ -28,7 +26,8 @@ class Lgtm < Formula
|
|||
end
|
||||
|
||||
def install
|
||||
if build.head?
|
||||
case
|
||||
when build.head?
|
||||
mkdir_p buildpath/File.join("src", "github.com", "go-gitea")
|
||||
ln_s buildpath, buildpath/File.join("src", "github.com", "go-gitea", "lgtm")
|
||||
|
||||
|
@ -38,11 +37,13 @@ class Lgtm < Formula
|
|||
ENV["GOHOME"] = buildpath
|
||||
ENV["TAGS"] = ""
|
||||
|
||||
system("make", "build")
|
||||
system "cd src/github.com/go-gitea/lgtm && make build"
|
||||
|
||||
bin.install "#{buildpath}/bin/lgtm" => "lgtm"
|
||||
bin.install "#{buildpath}/lgtm" => "lgtm"
|
||||
when build.devel?
|
||||
bin.install "#{buildpath}/lgtm-master-darwin-10.6-amd64" => "lgtm"
|
||||
else
|
||||
bin.install "#{buildpath}/lgtm-master-darwin-amd64" => "lgtm"
|
||||
bin.install "#{buildpath}/lgtm-1.0.0-darwin-10.6-amd64" => "lgtm"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче