-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
54 lines (45 loc) · 1.36 KB
/
build.xml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0"?>
<project name="storage" default="build">
<property name="project_name" value="egc-storage" />
<property name="version" value="2.0" />
<property name="srcdir" value="./src/" />
<property name="builddir" value="./build/" />
<fileset dir="${srcdir}" id="srcfiles">
<include name="*.*" />
<include name="**/*.*" />
</fileset>
<fileset dir="${srcdir}" id="phpfiles">
<include name="*.php" />
<include name="**/*.php" />
</fileset>
<target name="main">
<phingcall target="test" />
</target>
<target name="compile">
<phplint>
<fileset refid="phpfiles" />
</phplint>
</target>
<target name="test" depends="compile">
<phpunit printsummary="true" haltonfailure="true" pharlocation="/usr/local/bin/phpunit">
<batchtest>
<fileset dir="./tests">
<include name="*Test.php" />
</fileset>
</batchtest>
</phpunit>
</target>
<target name="build" depends="test">
<mkdir dir="${builddir}" />
<zip destfile="${builddir}/${project_name}-${version}.zip" basedir="${srcdir}" />
</target>
<target name="clear">
<available file="${builddir}" type="dir" property="dir.Exists" />
<if>
<isset property="dir.Exists"/>
<then>
<delete dir="${builddir}" />
</then>
</if>
</target>
</project>