homebrew-core/Formula/flyway.rb

21 lines
614 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/6.5.3/flyway-commandline-6.5.3.tar.gz"
sha256 "4c07f2b9e9e2e0e01b0d5d3c78981ef6db5167863e7ba50c9de9c476de4baabf"
bottle :unneeded
depends_on "openjdk"
def install
rm Dir["*.cmd"]
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