homebrew-core/Formula/metabase.rb

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.44.5/metabase.jar"
sha256 "6051543d61551eb1e963f413d08949bf93c6b66b3a46e1395a9d7b090346fc0c"
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: "69b4f709c0944bfdb4e546c36d7b2107ea81cccf268c7021ecb6c22506dcb36d"
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