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.8.3/flyway-commandline-9.8.3.tar.gz"
|
|
sha256 "67b589cc507abe5abae5466a826b26bcbfaa6d3970ba98b7718b0964f22bc5d6"
|
|
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: "24434504c7a5ff2667297a98d3725e0eea2203eb065e398ca38833295e336bb7"
|
|
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
|