2010-02-13 20:14:25 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Grails < Formula
|
2010-02-13 20:14:25 +00:00
|
|
|
homepage 'http://grails.org'
|
2012-12-20 15:58:40 +00:00
|
|
|
url 'http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.2.0.zip'
|
|
|
|
sha1 'b77a86b5ae36e73dd20acc0996cd04db5390a994'
|
2010-02-13 20:14:25 +00:00
|
|
|
|
|
|
|
def install
|
2011-01-23 19:57:10 +00:00
|
|
|
rm_f Dir["bin/*.bat", "bin/cygrails", "*.bat"]
|
2012-11-11 19:20:09 +00:00
|
|
|
prefix.install_metafiles
|
2011-01-23 19:57:10 +00:00
|
|
|
libexec.install Dir['*']
|
2012-02-12 21:51:21 +00:00
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
2010-02-13 20:14:25 +00:00
|
|
|
end
|
2011-03-15 13:40:55 +00:00
|
|
|
|
2012-02-12 21:57:05 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2012-02-12 21:51:21 +00:00
|
|
|
Notes On Upgrading Grails From Versions < 1.3.7
|
2011-03-15 13:40:55 +00:00
|
|
|
|
|
|
|
The directory layout has been changed slightly for versions >= 1.3.7
|
|
|
|
in order to conform with Homebrew conventions for installation of Java
|
|
|
|
jar files. Please note the following:
|
|
|
|
|
2012-02-12 21:57:05 +00:00
|
|
|
Before upgrading:
|
|
|
|
run 'brew unlink grails' (keeps old version in cellar)
|
|
|
|
or
|
|
|
|
run 'brew rm grails' (deletes old version from cellar)
|
2011-03-15 13:40:55 +00:00
|
|
|
|
2012-02-12 21:57:05 +00:00
|
|
|
and then:
|
2011-03-15 13:40:55 +00:00
|
|
|
run 'brew prune'
|
|
|
|
|
2012-02-12 21:57:05 +00:00
|
|
|
This is to ensure that HOMEBREW_PREFIX is cleaned of references to the
|
2011-03-15 13:40:55 +00:00
|
|
|
old version.
|
|
|
|
|
2012-02-12 21:57:05 +00:00
|
|
|
The Grails home directory for versions < 1.3.7 was in the form:
|
|
|
|
#{HOMEBREW_CELLAR}/grails/1.3.6
|
2011-03-15 13:40:55 +00:00
|
|
|
|
2012-02-12 21:57:05 +00:00
|
|
|
For versions >= 1.3.7, the Grails home directory is in the form:
|
2011-03-15 13:40:55 +00:00
|
|
|
#{libexec}
|
|
|
|
|
|
|
|
If you set the GRAILS_HOME variable explicitly in your shell environment,
|
|
|
|
change its value accordingly.
|
|
|
|
EOS
|
|
|
|
end
|
2011-01-23 19:57:10 +00:00
|
|
|
end
|