-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
39 lines (33 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="lucille" default="build" basedir=".">
<target name="setup" depends="clean,generate-autoloader"/>
<target name="build" depends="setup,lint,test"/>
<target name="clean" unless="clean.done" description="Clean up and create artifact directories">
<delete dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/coverage"/>
<property name="clean.done" value="true"/>
</target>
<target name="generate-autoloader" description="Generate autoload.php using phpab">
<exec executable="phpab" taskname="phpab">
<arg value="--output"/>
<arg path="${basedir}/autoload.php"/>
<arg path="${basedir}/src"/>
</exec>
</target>
<target name="lint">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/src">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/tests">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
</target>
<target name="test" depends="generate-autoloader" description="Run tests">
<exec executable="phpunit" taskname="phpunit"/>
</target>
</project>