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.1/metabase.jar"
|
|
sha256 "15f5fff922095a7492a937f4c87d3108359b05d5dbcd54a840448708ee68438b"
|
|
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: "18eff84b7d948c724de728f56f5fb5c2efea1a93d18bbd3651fa7031a2b82092"
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/metabase/metabase.git", branch: "master"
|
|
|
|
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
|
|
|
|
service do
|
|
run opt_bin/"metabase"
|
|
keep_alive true
|
|
require_root 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
|