homebrew-core/Formula/flyway.rb

30 lines
961 B
Ruby

class Flyway < Formula
desc "Database version control to control migrations"
homepage "https://flywaydb.org/"
url "https://search.maven.org/remotecontent?filepath=org/flywaydb/flyway-commandline/9.10.2/flyway-commandline-9.10.2.tar.gz"
sha256 "18ef2cd40c2773ecb232c57c249d56dab6ed020f5680bebfb3377bc7a5ce3c9a"
license "Apache-2.0"
livecheck do
url "https://search.maven.org/remotecontent?filepath=org/flywaydb/flyway-commandline/maven-metadata.xml"
regex(%r{<version>v?(\d+(?:\.\d+)+)</version>}i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "bc31a964d7f1c5eb211c91d79162e5f18ab140fd7a4568879fade501ebe82584"
end
depends_on "openjdk"
def install
rm Dir["*.cmd"]
chmod "g+x", "flyway"
libexec.install Dir["*"]
(bin/"flyway").write_env_script libexec/"flyway", JAVA_HOME: Formula["openjdk"].opt_prefix
end
test do
system "#{bin}/flyway", "-url=jdbc:h2:mem:flywaydb", "validate"
end
end