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:
Lukas Bestle 2020-05-26 12:40:38 +00:00 committed by Lunny Xiao
parent 3de31be4f1
commit 1a2e8c4ab3
1 changed files with 5 additions and 9 deletions

View File

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