/
build.xml
executable file
·68 lines (52 loc) · 2.33 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
62
63
64
65
66
67
68
<?xml version="1.0"?>
<project name="ZucchiModel" description="Build file for ZucchiModel" default="build" >
<target name="build" depends="generate-classmap, report, codeception, phpdoc, manual" description="Build ZucchiModel"></target>
<target name="phpdoc" description="Generate PHP API Docs">
<phpdoc2 title="ZucchiModel"
destdir="docs/php"
quiet="false"
template="responsive">
<fileset dir="./src">
<include name="**/*.php" />
</fileset>
</phpdoc2>
</target>
<target name="report" description="Run Various Reports against source">
<phplint haltonfailure="true" tofile="docs/reports/lint.txt">
<fileset dir="src/">
<include name="**/*.php"/>
</fileset>
</phplint>
<phpmd file="src/">
<formatter type="html" outfile="docs/reports/mess-detection.html"/>
</phpmd>
<phpdepend file="src/">
<logger type="phpunit-xml" outfile="docs/reports/phpdepend.xml"/>
</phpdepend>
<phpcpd file="src">
<formatter type="pmd" outfile="docs/reports/pmd-cpd.xml"/>
</phpcpd>
<phploc countTests="true" reportType="xml" reportName="phploc" reportDirectory="docs/reports/">
<fileset dir="src/">
<include name="**/*.php" />
<include name="*.php" />
</fileset>
</phploc>
</target>
<target name="codeception" description="Run Codeception tests">
<exec command="vendor/bin/codecept run --coverage --html" passthru="true" />
<if>
<available file='tests/_log/coverage' type='dir' />
<then>
<move file="tests/_log/coverage" todir="docs/" includeemptydirs="true" />
</then>
</if>
</target>
<target name="generate-classmap" description="Generate Classmaps">
<exec command="vendor/bin/classmap_generator.php -l src/ -o autoload_classmap.php -w" passthru="true" />
<exec command="vendor/bin/classmap_generator.php -l tests/unit/ZucchiModelTest/ -o autoload_classmap.php -a" passthru="true" />
</target>
<target name="manual" description="Generate User Manual">
<exec command="make html" dir="docs/manual" passthru="true" />
</target>
</project>