-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
71 lines (57 loc) · 2.49 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
69
70
71
<?xml version="1.0" ?>
<project name="intraface" default="build" basedir=".">
<property name="source.dir" value="./src/" />
<property name="tests.dir" value="./tests/unit/" />
<property name="build.dir" value="../build" />
<property name="reports.dir" value="../build/logs" />
<property name="reports.phpunit.dir" value="../../../build/logs" />
<property name="reports.coverage.dir" value="../../../build/coverage" />
<property name="api.dir" value="../build/api" />
<target name="prepare">
<delete dir="${build.dir}" />
</target>
<target name="build" depends="prepare,checkout,test,php-codesniffer,php-documentor,pear-create">
</target>
<target name="checkout">
<exec dir="${source.dir}" command="svn export ${source.dir} ${build.dir}" />
<mkdir dir="${reports.dir}" />
</target>
<target name="test" depends="phpunit,merge"></target>
<target name="phpunit">
<exec dir="${tests.dir}" command="phpunit
--log-junit ${reports.phpunit.dir}/unit.xml
--coverage-html ${reports.coverage.dir}/
." passthru="true" checkreturn="false" />
</target>
<target name="selenium">
<exec dir="${tests.dir}" command="phpunit
--log-xml ${reports.phpunit.dir}/selenium.xml
SeleniumTests" passthru="true" checkreturn="false" />
</target>
<target name="merge">
<exec dir="${build.dir}" command="phpuc merge-phpunit
-b unit,selenium
-i logs/unit.xml,logs/selenium.xml
-o logs/phpunit.xml"/>
<delete file="${build.dir}/logs/unit.xml" />
<delete file="${build.dir}/logs/selenium.xml" />
</target>
<target name="php-codesniffer">
<exec output="${reports.dir}/checkstyle.xml" dir="${source.dir}/Intraface/" error="${reports.dir}/phpcserror.log"
command="phpcs --report=checkstyle . --standard=PEAR" />
</target>
<target name="php-documentor">
<exec dir="${source.dir}" command="phpdoc -ue on -t ${api.dir} -d ${source.dir}/Intraface" />
</target>
<target name="pear">
<exec dir="${build.dir}" command="php generate_package_xml.php make" />
</target>
<target name="pear-create" depends="pear">
<exec dir="${build.dir}" command="pear package package.xml" />
</target>
<target name="create-pear-package" depends="prepare,checkout,pear-create">
</target>
<target name="deploy">
<property file="./build.properties" />
</target>
</project>