-
Notifications
You must be signed in to change notification settings - Fork 457
/
ant-contrib.rb
37 lines (32 loc) · 1 KB
/
ant-contrib.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class AntContrib < Formula
desc "Collection of tasks for Apache Ant"
homepage "https://ant-contrib.sourceforge.io/"
url "https://downloads.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.tar.gz"
sha256 "6e58c2ee65e1f4df031796d512427ea213a92ae40c5fc0b38d8ac82701f42a3c"
livecheck do
url :stable
regex(%r{url=.*?/ant-contrib[._-]v?(\d+(?:\.\d+)+(?:[a-z]\d+)?)-bin\.t}i)
end
bottle :unneeded
depends_on "ant"
def install
(share+"ant").install "ant-contrib-1.0b3.jar"
share.install "docs"
end
test do
(testpath/"build.xml").write <<~EOS
<project name="HomebrewTest" default="init" basedir=".">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<target name="init">
<if>
<equals arg1="BREW" arg2="BREW" />
<then>
<echo message="Test passes!"/>
</then>
</if>
</target>
</project>
EOS
system Formula["ant"].opt_bin/"ant"
end
end