41 lines
1.1 KiB
Ruby
41 lines
1.1 KiB
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/v5.2.1/grails-5.2.1.zip"
|
|
sha256 "be912590e2b565c5010c33faf3e3d008c80a8252764a861be790a8836dc05218"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "4d26a8b9a0683908390f3b1211414d4e51e6c5f31c7fb7ddc34878c04bbe6d24"
|
|
end
|
|
|
|
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", Language::Java.overridable_java_home_env("11")
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
The GRAILS_HOME directory is:
|
|
#{opt_libexec}
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system bin/"grails", "create-app", "brew-test"
|
|
assert_predicate testpath/"brew-test/gradle.properties", :exist?
|
|
assert_match "brew.test", File.read(testpath/"brew-test/build.gradle")
|
|
|
|
assert_match "Grails Version: #{version}", shell_output("#{bin}/grails -v")
|
|
end
|
|
end
|