Merge pull request #7 from jediorange/master

Fix URLs and filenames
This commit is contained in:
Lunny Xiao 2017-01-07 11:09:20 +08:00 committed by GitHub
commit 3d83f5d7a9
1 changed files with 9 additions and 8 deletions

View File

@ -5,14 +5,14 @@ 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-amd64"
sha256 `curl -s http://dl.gitea.io/gitea/1.0.0/gitea-1.0.0-darwin-amd64.sha256`.split(" ").first
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"
end
devel do
url "http://dl.gitea.io/gitea/master/gitea-master-darwin-amd64"
sha256 `curl -s http://dl.gitea.io/gitea/master/gitea-master-darwin-amd64.sha256`.split(" ").first
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
version "master"
end
@ -20,7 +20,6 @@ class Gitea < Formula
url "https://github.com/go-gitea/gitea.git", :branch => "master"
depends_on "go" => :build
depends_on "git" => :build
end
test do
@ -38,11 +37,13 @@ class Gitea < Formula
ENV["GOHOME"] = buildpath
ENV["TAGS"] = "sqlite"
system("make", "build")
system "cd src/code.gitea.io/gitea && make build"
bin.install "#{buildpath}/bin/gitea" => "gitea"
bin.install "#{buildpath}/gitea" => "gitea"
elsif build.devel?
bin.install "#{buildpath}/gitea-master-darwin-10.6-amd64" => "gitea"
else
bin.install "#{buildpath}/gitea-master-darwin-amd64" => "gitea"
bin.install "#{buildpath}/gitea-1.0.0-darwin-10.6-amd64" => "gitea"
end
end
end