30 lines
959 B
Ruby
30 lines
959 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.4.0/flyway-commandline-9.4.0.tar.gz"
|
|
sha256 "865cb6ca37b0298c75d6455fbf50d7ec17e2e7016799e80fe2b54ab446e4c584"
|
|
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: "ae0d4da616d7ade4b3f5d059b6478cc421b83ec786d4d1f36f0364a8f60cbcac"
|
|
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
|