-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
59 lines (52 loc) · 2.22 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Combell public API" default="build" basedir=".">
<target name="build"
depends="prepare, composer-install, lint, phpunit"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/api"/>
<delete dir="${basedir}/build/coverage"/>
<delete dir="${basedir}/build/coverage/html"/>
<delete dir="${basedir}/build/logs"/>
<delete dir="${basedir}/build/pdepend"/>
<delete dir="${basedir}/build/phpdox"/>
<delete file="${basedir}/cache.properties"/>
</target>
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/coverage/html"/>
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
<mkdir dir="${basedir}/build/phpdox"/>
</target>
<target name="composer-install" description="Install all dependencies with composer">
<exec executable="composer" failonerror="true">
<arg value="install"/>
<arg value="--no-progress" />
<arg value="--prefer-dist" />
</exec>
</target>
<target name="lint" description="Perform syntax check of sourcecode files">
<apply executable="php" failonerror="true">
<arg value="--syntax-check" />
<fileset dir="${basedir}/src">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/examples">
<include name="**/*.phtml" />
<modified />
</fileset>
</apply>
</target>
<target name="phpunit" description="Run PHPUnit tests">
<exec executable="${basedir}/vendor/bin/phpunit" failonerror="true">
<arg value="--coverage-clover" />
<arg value="${basedir}/build/coverage/clover.xml" />
<arg value="--coverage-html" />
<arg value="${basedir}/build/coverage/html" />
<arg value="--log-junit" />
<arg value="${basedir}/build/logs/index.xml" />
</exec>
</target>
</project>