-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
38 lines (33 loc) · 1.56 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Prospect" basedir="./" default="all">
<property name="tmp" value="/tmp" />
<property name="wsname" value="tests" />
<property name="package" value="${phing.project.name}" override="true" />
<property name="builddir" value="${tmp}/build/" override="true" />
<property name="srcdir" value="src/" override="true" />
<property name="reportdir" value="${builddir}/tests/report" />
<property name="docsdir" value="${builddir}/tests/report/api" />
<target name="setup" description="run tests">
<!-- Create dirs -->
<mkdir dir="${reportdir}"/>
<mkdir dir="${reportdir}/coverage"/>
<mkdir dir="${docsdir}"/>
</target>
<target name="tests" depends="setup" description="run tests">
<exec command="phpunit --configuration phpunit.xml.dist"/>
</target>
<target name="standards" depends="setup" description="test for code standards">
<exec command="phpmd ${srcdir} xml codesize,unusedcode,naming,design --reportfile ${reportdir}/pmd.xml"/>
<exec command="phpcs --report=checkstyle --standard=PEAR --extensions=php --tab-width=4 --report-file=${reportdir}/phpcs.xml ${srcdir}"/>
</target>
<target name="docs" depends="setup,tests" description="generate API documentation">
<phpdoc title="Http"
sourcecode="yes"
destdir="${docsdir}"
output="HTML:frames:DOM/phphtmllib"
quiet="true">
<fileset dir="${srcdir}"/>
</phpdoc>
</target>
<target name="all" depends="setup,tests,standards,docs" description="run all targets"/>
</project>