homebrew-core/Formula/grails.rb

35 lines
868 B
Ruby

class Grails < Formula
desc "Web application framework for the Groovy language"
homepage "https://grails.org"
url "https://github.com/grails/grails-core/releases/download/v4.0.5/grails-4.0.5.zip"
sha256 "fbf54eb54a64628b560140bcd50991fb591ccc510ed5a4a14fbc6862a242bcb1"
license "Apache-2.0"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle :unneeded
depends_on "openjdk@11"
def install
rm_f Dir["bin/*.bat", "bin/cygrails", "*.bat"]
libexec.install Dir["*"]
bin.install Dir["#{libexec}/bin/*"]
bin.env_script_all_files libexec/"bin", JAVA_HOME: "${JAVA_HOME:-#{Formula["openjdk@11"].opt_prefix}}"
end
def caveats
<<~EOS
The GRAILS_HOME directory is:
#{opt_libexec}
EOS
end
test do
assert_match "Grails Version: #{version}", shell_output("#{bin}/grails -v")
end
end