-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.xml.dist
40 lines (34 loc) · 1.48 KB
/
build.xml.dist
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
<?xml version="1.0" encoding="utf-8"?>
<project name="phulp" basedir="." default="main">
<property name="source" value="src" />
<property name="test" value="test" />
<property name="bindir" value="bin" />
<target name="main" description="Start analyzing our application">
<echo msg="Start Build" />
<phingCall target="phplint" />
<phingCall target="phpunit" />
<phingCall target="phpcs" />
<echo msg="Finished Build" />
</target>
<target name="phplint" description="Check syntax of a fileset of source files.">
<phplint>
<fileset dir="${bindir}">
<include name="**/*.php"/>
</fileset>
<fileset dir="${source}">
<include name="**/*.php"/>
</fileset>
<fileset dir="${test}">
<include name="**/*.php"/>
</fileset>
</phplint>
</target>
<target name="phpunit" description="Run unit tests using PHPUnit">
<exec passthru="true" command="${bindir}/phpunit" checkreturn="true"/>
</target>
<target name="phpcs" description="Coding Standards Analysis">
<exec passthru="true" command="${bindir}/phpcs --standard=PSR2 ${source}" checkreturn="true" />
<exec passthru="true" command="${bindir}/phpcs --standard=PSR2 ${bindir}/phulp.php" checkreturn="true" />
<exec passthru="true" command="${bindir}/phpcs --standard=PSR2 ${test}" checkreturn="true" />
</target>
</project>