forked from thePHPcc/ConFoo-2015
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
61 lines (50 loc) · 1.9 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
59
60
61
<?xml version="1.0" encoding="UTF-8"?>
<project name="ConFoo" default="build">
<target name="build" depends="lint,test">
</target>
<target name="autoload" description="Generate autoloader scripts">
<exec executable="${basedir}/build-tools/phpab.phar">
<arg value="--output"/>
<arg path="src/autoload.php"/>
<arg path="src"/>
</exec>
<exec executable="${basedir}/build-tools/phpab.phar">
<arg value="--output"/>
<arg path="tests/autoload.php"/>
<arg path="tests"/>
</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" description="Run unit tests">
<condition property="phpunit.args" value="${phpunit}" else="">
<isset property="phpunit"/>
</condition>
<exec executable="${basedir}/vendor/bin/phpunit" failonerror="true">
<arg value="--configuration"/>
<arg path="${basedir}"/>
<arg line="${phpunit.args}"/>
</exec>
</target>
<target name="sniff" description="Inspect for coding standard violations">
<exec executable="${basedir}/vendor/bin/phpcs" failonerror="true">
<arg line="--standard=PSR2 --colors src"/>
</exec>
</target>
<target name="mess" description="Run mess detector">
<exec executable="${basedir}/vendor/bin/phpmd" failonerror="true">
<arg line="src text codesize,cleancode,controversial,design,naming,unusedcode"/>
</exec>
</target>
</project>