-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
104 lines (92 loc) · 4.64 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
<?xml version="1.0" ?>
<project name="Ilib_DBQuery" basedir="." default="build">
<taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
<taskdef classname="phing.tasks.ext.IlibPearDeployerTask" name="peardeploy" />
<property name="package-name" value="${phing.project.name}" />
<property name="version" value="0.1.11" />
<property name="stability" value="stable" />
<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.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}" />
<mkdir dir="${build.dir}" />
</target>
<target name="export">
<echo msg="Cloning git repository" />
<exec command="git clone git://github.com/intraface/Ilib_DBQuery.git ${build.dir}/temp" />
<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}/temp/src">
<include name="**" />
</fileset>
</copy>
</target>
<target name="pear" depends="export">
<d51pearpkg2 dir="${build.dir}/package/${package-name}-${version}/" baseinstalldir="/">
<name>${package-name}</name>
<summary>DB query management with paging and storing of results</summary>
<channel>${pear.channel}</channel>
<description>
DB query management with paging and storing of results
</description>
<lead user="lsolesen" name="Lars Olesen" email="lars@legestue.net" />
<lead user="sune.t.jensen" name="Sune Jensen" email="sj@sunet.dk" />
<license>LGPL</license>
<version release="${version}" api="${version}" />
<stability release="${stability}" api="${stability}" />
<release>
</release>
<dependencies>
<php minimum_version="5.2.0" />
<pear minimum_version="1.6.0" />
<package name="DB_Sql" channel="public.intraface.dk" minimum_version="0.0.1" />
<package name="Ilib_Error" channel="public.intraface.dk" minimum_version="1.0.0" />
</dependencies>
<notes>* Updated version for Ilib_Error</notes>
</d51pearpkg2>
</target>
<target name="build" depends="prepare, export, php-documentor, make-pear-package"></target>
<target name="make-pear-package" depends="pear">
<tar compression="gzip" destfile="${build.dir}/${package-name}-${version}.tgz" basedir="${build.dir}/package" />
</target>
<target name="deploy" depends="build">
<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/" 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">
<mkdir dir="${api.dir}/${package-name}" />
<exec dir="${source.dir}" command="phpdoc -ue on -t ${api.dir}/${package-name} -d ./src" passthru="true" />
</target>
<target name="test">
<exec dir="${tests.dir}" command="phpunit
--log-xml ${reports.phpunit.dir}/phpunit.xml
--log-pmd ${reports.phpunit.dir}/phpunit.pmd.xml
--coverage-xml ${reports.phpunit.dir}/phpunit.coverage.xml
--coverage-html ${reports.coverage.dir}/
DBQueryTest" passthru="true" checkreturn="true" />
</target>
</project>