Clean up gitea formula according to `brew audit` (#94)
Clean up gitea formula according to `brew audit` Signed-off-by: Lukas Bestle <account-gitea@lukasbestle.com> Reviewed-on: https://gitea.com/gitea/homebrew-gitea/pulls/94 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: 6543 <6543@noreply.gitea.io>
This commit is contained in:
parent
3de31be4f1
commit
1a2e8c4ab3
14
gitea.rb
14
gitea.rb
|
@ -1,8 +1,5 @@
|
|||
require "formula"
|
||||
|
||||
class Gitea < Formula
|
||||
homepage "https://github.com/go-gitea/gitea"
|
||||
head "https://github.com/go-gitea/gitea.git"
|
||||
|
||||
def self.bin_filename(version)
|
||||
os = OS.mac? ? "darwin-10.6" : "linux"
|
||||
|
@ -39,13 +36,8 @@ class Gitea < Formula
|
|||
depends_on "go" => :build
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/gitea", "--version"
|
||||
end
|
||||
|
||||
def install
|
||||
case
|
||||
when build.head?
|
||||
if build.head?
|
||||
mkdir_p buildpath/File.join("src", "code.gitea.io")
|
||||
ln_s buildpath, buildpath/File.join("src", "code.gitea.io", "gitea")
|
||||
|
||||
|
@ -62,4 +54,8 @@ class Gitea < Formula
|
|||
bin.install "#{buildpath}/#{Gitea.bin_filename(version)}" => "gitea"
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/gitea", "--version"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue