-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
59 lines (52 loc) · 2 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
55
56
57
58
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="build">
<target name="build" depends="phpab,unit"/>
<target name="clean" unless="clean.done" description="Cleanup build artifacts">
<delete dir="${basedir}/build"/>
<delete file="${basedir}/src/autoload.php"/>
<delete file="${basedir}/tests/autoload.php"/>
<property name="clean.done" value="true"/>
</target>
<target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build"/>
<property name="prepare.done" value="true"/>
</target>
<target name="phpab" description="Generate autoloader with PHPAB">
<exec executable="${basedir}/phpab.phar">
<arg value="--output"/>
<arg path="src/autoload.php"/>
<arg value="src"/>
</exec>
<exec executable="${basedir}/phpab.phar">
<arg value="-e"/>
<arg path="tests/data"/>
<arg value="--output"/>
<arg path="tests/autoload.php"/>
<arg value="tests"/>
</exec>
</target>
<target name="cov" depends="phpab" description="Create code coverage report">
<exec executable="phpdbg">
<arg value="-qrr"/>
<arg path="${basedir}/phpunit.phar"/>
<arg value="-c"/>
<arg path="phpunit.xml"/>
<arg path="tests"/>
</exec>
</target>
<target name="testdox" depends="phpab" description="Create testdox">
<exec executable="${basedir}/phpunit.phar">
<arg value="-c"/>
<arg path="phpunit.xml"/>
<arg path="tests"/>
<arg value="--testdox"/>
</exec>
</target>
<target name="unit" depends="phpab" description="Run unit tests with PHPUnit">
<exec executable="${basedir}/phpunit.phar">
<arg value="-c"/>
<arg path="phpunit.xml"/>
<arg path="tests"/>
</exec>
</target>
</project>