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/9.5.1/flyway-commandline-9.5.1.tar.gz"
sha256 "89e1913fd48623cc38d9fdc135c3b99affc30771381f3c5ed2ad4fe44681c4af"
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: "c759f6432b8b9fff4c7b0b6a3f2ebcbfd237d971d6fa84d4d93fc9dad7f2b417"
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