51 lines
1.2 KiB
Ruby
51 lines
1.2 KiB
Ruby
class Metabase < Formula
|
|
desc "Business intelligence report server"
|
|
homepage "https://www.metabase.com/"
|
|
url "https://downloads.metabase.com/v0.45.0/metabase.jar"
|
|
sha256 "b4ee9ea6f0a12e60d8d2495d2c6f863c0c0cb2cc7910e9a13358c99c61ad2014"
|
|
license "AGPL-3.0-only"
|
|
|
|
livecheck do
|
|
url "https://www.metabase.com/start/oss/jar.html"
|
|
regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/metabase\.jar}i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "8f7e771dab84173ffed832526c379ac0ff95c61d74314b864ad4c0a66b5dc652"
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/metabase/metabase.git"
|
|
|
|
depends_on "leiningen" => :build
|
|
depends_on "node" => :build
|
|
depends_on "yarn" => :build
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
if build.head?
|
|
system "./bin/build"
|
|
libexec.install "target/uberjar/metabase.jar"
|
|
else
|
|
libexec.install "metabase.jar"
|
|
end
|
|
|
|
bin.write_jar_script libexec/"metabase.jar", "metabase"
|
|
end
|
|
|
|
plist_options startup: true
|
|
service do
|
|
run opt_bin/"metabase"
|
|
keep_alive true
|
|
working_dir var/"metabase"
|
|
log_path var/"metabase/server.log"
|
|
error_log_path "/dev/null"
|
|
end
|
|
|
|
test do
|
|
system bin/"metabase", "migrate", "up"
|
|
end
|
|
end
|