Apply same changes as gitea to lgtm

This commit is contained in:
Thomas Boerger 2017-01-10 09:28:47 +01:00
parent e513995cd0
commit f09a8bd445
No known key found for this signature in database
GPG Key ID: 5A388F55283960B6
1 changed files with 8 additions and 10 deletions

18
lgtm.rb
View File

@ -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
@ -39,13 +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-amd64" => "lgtm"
bin.install "#{buildpath}/lgtm-master-darwin-10.6-amd64" => "lgtm"
else
bin.install "#{buildpath}/lgtm-1.0.0-darwin-amd64" => "lgtm"
bin.install "#{buildpath}/lgtm-1.0.0-darwin-10.6-amd64" => "lgtm"
end
end
end