homebrew-core/Formula/flyway.rb

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.0.1/flyway-commandline-8.0.1.tar.gz"
sha256 "2a32fb2cbc9ecb47f76f89cd00f2a7f670032ce630d3e735107ef799c7ab80ef"
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: "fcbdde99d4bb0262c5946d1b4422dec57453e13c1d10ac09872a4f8c352a3368"
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