2014-05-17 20:04:02 +00:00
|
|
|
require "formula"
|
2010-02-19 04:45:45 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gant < Formula
|
2014-05-17 20:04:02 +00:00
|
|
|
homepage "http://gant.codehaus.org/"
|
|
|
|
url "http://dist.codehaus.org/gant/distributions/gant-1.9.11-_groovy-2.3.0.zip"
|
|
|
|
version "1.9.11"
|
|
|
|
sha1 "5601db2f5001de16b856330abec7b58e1fbf4779"
|
2010-02-19 04:45:45 +00:00
|
|
|
|
2014-05-17 20:04:02 +00:00
|
|
|
depends_on "groovy"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2010-02-19 04:45:45 +00:00
|
|
|
def install
|
|
|
|
rm_f Dir["bin/*.bat"]
|
|
|
|
# gant-starter.conf is found relative to bin
|
2010-08-13 15:08:20 +00:00
|
|
|
libexec.install %w[bin lib conf]
|
2014-05-17 20:04:02 +00:00
|
|
|
|
|
|
|
ENV["GANT_HOME"] = libexec
|
|
|
|
bin.install libexec/"bin/gant"
|
|
|
|
bin.env_script_all_files(libexec+"bin", :GANT_HOME => ENV["GANT_HOME"])
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"build.gant").write <<-EOS.undent
|
|
|
|
includeTargets << gant.targets.Clean
|
|
|
|
cleanPattern << ['**/*~', '**/*.bak']
|
|
|
|
cleanDirectory << 'build'
|
|
|
|
|
|
|
|
target(stuff: 'A target to do some stuff.') {
|
|
|
|
println 'Stuff'
|
|
|
|
depends clean
|
|
|
|
echo message: 'A default message from Ant.'
|
|
|
|
otherStuff()
|
|
|
|
}
|
|
|
|
|
|
|
|
target(otherStuff: 'A target to do some other stuff') {
|
|
|
|
println 'OtherStuff'
|
|
|
|
echo message: 'Another message from Ant.'
|
|
|
|
clean()
|
|
|
|
}
|
|
|
|
|
|
|
|
setDefaultTarget stuff
|
|
|
|
EOS
|
|
|
|
output = `#{bin}/gant`.strip
|
|
|
|
assert_match /BUILD SUCCESSFUL/, output
|
2010-02-19 04:45:45 +00:00
|
|
|
end
|
|
|
|
end
|