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/8.2.2/flyway-commandline-8.2.2.tar.gz"
|
|
sha256 "ea3c24df79b4e89876519204115dc3d5cf4c2ec631d56dacb19965890976eca5"
|
|
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: "e24fc858093d67dd72b6366192b7c85347352bf7d684edeb5d1507e9ef9a4617"
|
|
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
|