27 lines
772 B
Ruby
27 lines
772 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/7.1.1/flyway-commandline-7.1.1.tar.gz"
|
|
sha256 "aa09b89b790d9132a68cbc2e1dc79090dead5297b45195c8daaad819dfbe5a6b"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
url "https://flywaydb.org/documentation/usage/maven/"
|
|
regex(/<version>.*?v?(\d+(?:\.\d+)+)</im)
|
|
end
|
|
|
|
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
|