-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
67 lines (58 loc) · 2.44 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="PULSE" default="build">
<target name="build" depends="prepare,lint,phpdoc,phpunit"/>
<target name="clean" description="Cleanup build">
<delete dir="${project.basedir}/build" />
</target>
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${project.basedir}/docs" />
<mkdir dir="${project.basedir}/build/logs/lint" />
<mkdir dir="${project.basedir}/build/logs/phpunit" />
</target>
<target name="insertTags.loop" description="loops through all the files">
<foreach param="filename" absparam="absfilename" target="insertTags">
<fileset dir="${project.basedir}">
<patternset>
<include pattern="**/*.php" />
<exclude pattern="_*/**" />
</patternset>
</fileset>
</foreach>
</target>
<target name="phpdoc" depends="prepare">
<phpdoc2 title="Synthesize Documentation" destdir="${project.basedir}/docs" template="responsive">
<fileset dir="${project.basedir}/src">
<include name="**/*.php" />
</fileset>
<fileset dir="${project.basedir}/tests">
<include name="**/*.php" />
</fileset>
<fileset dir="${project.basedir}/examples">
<include name="**/*.php" />
</fileset>
</phpdoc2>
</target>
<target name="lint">
<phplint tofile="${project.basedir}/build/logs/lint/errors.txt" haltonfailure="true">
<fileset dir="${project.basedir}/src">
<include name="**/*.php" />
</fileset>
<fileset dir="${project.basedir}/tests">
<include name="**/*.php" />
</fileset>
<fileset dir="${project.basedir}/examples">
<include name="**/*.php" />
</fileset>
</phplint>
</target>
<target name="phpunit">
<phpunit bootstrap="${project.basedir}/vendor/autoload.php" haltonfailure="true" haltonerror="true" printsummary="true" pharlocation="/usr/local/bin/phpunit">
<formatter type="xml" todir="${project.basedir}/build/logs/phpunit"/>
<batchtest>
<fileset dir="${project.basedir}">
<include name="**/*Test.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
</project>