Clean up gitea formula according to brew audit

Signed-off-by: Lukas Bestle <account-gitea@lukasbestle.com>
This commit is contained in:
Lukas Bestle 2020-05-24 09:58:36 +00:00 committed by Lukas Bestle
parent 3de31be4f1
commit 1af27edbf3

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