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.3.1/flyway-commandline-7.3.1.tar.gz"
|
|
sha256 "888fd493fe6d97df5ef91efeb7f670492a52c623851e35b9d9bc5129086d31e3"
|
|
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
|