Merge pull request #4 from go-gitea/stable-devel-head

Make stable/devel/head installable
This commit is contained in:
Thomas Boerger 2017-01-10 13:02:21 +01:00 коммит произвёл GitHub
Родитель 3d83f5d7a9 1278ab757d
Коммит b4e91566ca
2 изменённых файлов: 21 добавлений и 20 удалений

Просмотреть файл

@ -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
Просмотреть файл

@ -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