-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
114 lines (96 loc) · 4.61 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.0" ?>
<project name="Ilib_Testing_Selenium_Selenese_TestSuiteGenerator" basedir="." default="build">
<taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
<taskdef classname="phing.tasks.ext.IlibPearDeployerTask" name="peardeploy" />
<taskdef classname="phing.tasks.ext.FtpDeployTask" name="ftpdeploy" />
<property name="package-name" value="${phing.project.name}" />
<property name="version" value="0.1.2" />
<property name="stability" value="alpha" />
<property name="pear.channel" value="public.intraface.dk" />
<property name="source.dir" value="./" />
<property name="tests.dir" value="./tests" />
<property name="build.dir" value="../build" />
<property name="reports.phpcs.dir" value="../build/logs" />
<property name="reports.phpunit.dir" value="../../build/logs" />
<property name="reports.coverage.dir" value="../../build/logs/coverage" />
<property name="api.dir" value="../build/api" />
<target name="prepare">
<delete dir="${build.dir}" />
</target>
<target name="export">
<echo msg="Cloning git repository" />
<delete dir="${build.dir}" />
<exec command="git clone git://github.com/intraface/Ilib_Testing_Selenium_Selenese_TestSuiteGenerator.git ${build.dir}" />
<mkdir dir="${build.dir}/package/${package-name}-${version}" />
<copy todir="${build.dir}/package/${package-name}-${version}">
<filterchain>
<replacetokens begintoken="@@" endtoken="@@">
<token key="VERSION" value="${version}" />
</replacetokens>
</filterchain>
<fileset dir="${build.dir}/src">
<include name="Ilib/**" />
</fileset>
</copy>
</target>
<target name="pear" depends="export">
<d51pearpkg2 dir="${build.dir}/package/${package-name}-${version}/" baseinstalldir="/">
<name>${package-name}</name>
<summary>Easily write a test suite for selenese</summary>
<channel>${pear.channel}</channel>
<description>
<!-- Don't exceed this width -->
Easily write a test suite for selenese.
</description>
<lead user="lsolesen" name="Lars Olesen" email="[email protected]" />
<lead user="sune.t.jensen" name="Sune Jensen" email="[email protected]" />
<license>LGPL</license>
<version release="${version}" api="${version}" />
<stability release="${stability}" api="${stability}" />
<dependencies>
<php minimum_version="5.2.0" />
<pear minimum_version="1.6.0"
recommended_version="1.6.1" />
</dependencies>
<notes>
* QA Release
</notes>
</d51pearpkg2>
</target>
<target name="build" depends="prepare, export, test, php-documentor, phpcs, make-pearpackage">
</target>
<target name="make-pearpackage" depends="pear">
<echo msg="Creating PEAR archive file for ${package-name}" />
<tar compression="gzip" destfile="${build.dir}/${package-name}-${version}.tgz" basedir="${build.dir}/package/" />
</target>
<target name="deploy" depends="make-pearpackage">
<property file="./build.properties" />
<peardeploy uri="${pear.channel.uri}" username="${pear.channel.username}" password="${pear.channel.password}">
<fileset dir="${build.dir}">
<include name="${package-name}-${version}.tgz"/>
</fileset>
</peardeploy>
<!--
<ftpdeploy host="${ftp.host}" username="${ftp.user}" password="${ftp.password}" port="21" dir="./public.intraface.dk/docs/${package-name}" mode="binary" clearfirst="false">
<fileset dir="${api.dir}">
<include name="*/**" />
</fileset>
</ftpdeploy>
-->
</target>
<target name="phpcs">
<exec output="${reports.phpcs.dir}/checkstyle.xml" dir="${source.dir}/src"
command="phpcs --report=checkstyle . --standard=PEAR" />
</target>
<target name="php-documentor" depends="export">
<delete dir="${api.dir}/" />
<mkdir dir="${api.dir}/" />
<exec dir="${source.dir}" command="phpdoc -ue on -t ${api.dir} -d ./" passthru="true" />
</target>
<target name="test">
<exec dir="${tests.dir}" command="phpunit
--log-junit ${reports.phpunit.dir}/phpunit.xml
--coverage-html ${reports.coverage.dir}/
." passthru="true" checkreturn="true" />
</target>
</project>