/
build.xml
51 lines (47 loc) · 1.81 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Example Build File to use with Phing -->
<project name="Alphred" default="welcome" basedir="." description="A PHP library for Alphred 2 Workflows">
<property name="message" value="Hello World!"/>
<property name="buildDir" value="build"/>
<property name="testDir" value="tests"/>
<property name="docsDir" value="docs"/>
<target name="prepare">
<mkdir dir="reports/coverage"/>
<mkdir dir="reports/tests"/>
<mkdir dir="docs"/>
</target>
<target name="reports">
<coverage-setup database="reports/coverage.db">
<fileset dir="src">
<include name="*.php"/>
<exclude name="*Test.php"/>
</fileset>
</coverage-setup>
<phpunit codecoverage="true">
<formatter type="xml" todir="reports"/>
<batchtest>
<fileset dir="src">
<include name="*Test.php"/>
</fileset>
</batchtest>
</phpunit>
<phpunitreport infile="reports/testsuites.xml" format="frames" todir="reports/tests" styledir="../../etc"/>
<coverage-report outfile="reports/coverage.xml">
<report todir="reports/coverage" styledir="../../etc"/>
</coverage-report>
</target>
<target name="build" depends="test">
<echo msg="Building phar..."/>
<exec command="php build-phar.php" escape="false" />
</target>
<target name="test">
<phpunit configuration="phpunit.xml"/>
<!-- <phpunit codecoverage="true">
<formatter type="clover" outfile="clover.xml"/>
</phpunit> -->
</target>
<target name="docs">
<apigen source="classes" destination="docs" title="My Project API Documentation" deprecated="true"
todo="true"/>
</target>
</project>