30 lines
912 B
Ruby
30 lines
912 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.15.0/flyway-commandline-7.15.0.tar.gz"
|
|
sha256 "909b77a51f28d24eb3c7b3ec4ec45d017ba1627b65ef2b9bbd83188d9c228abc"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
url "https://flywaydb.org/documentation/usage/maven/"
|
|
regex(/<version>.*?v?(\d+(?:\.\d+)+)</im)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "dd466921e32e0762229f7979b7893fd76384788661f1dbd2de6ea6d4e49043fd"
|
|
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
|