forked from intraface/Ilib_Keyword
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
103 lines (92 loc) · 4.63 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
<?xml version="1.0" ?>
<project name="Ilib_Keyword" 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.4.1" />
<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.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="Exporting SVN files" />
<exec command="svn export ${source.dir}/src ${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">
<include name="**" />
</fileset>
</copy>
</target>
<target name="pear" depends="export">
<d51pearpkg2 dir="${build.dir}/package/${package-name}-${version}/" baseinstalldir="/">
<name>${package-name}</name>
<summary>Makes it possible to tag items.</summary>
<channel>${pear.channel}</channel>
<description>
Makes it possible to tag different items.
</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}" />
<release>
</release>
<dependencies>
<php minimum_version="5.2.0" />
<pear minimum_version="1.6.0" recommended_version="1.6.1" />
<package name="DB_Sql" channel="public.intraface.dk" recommended_version="" minimum_version="0.0.1" />
<package name="Ilib_Error" channel="public.intraface.dk" recommended_version="" minimum_version="0.0.1" />
</dependencies>
<notes>* Bugfixes</notes>
</d51pearpkg2>
</target>
<target name="build" depends="prepare, export, test, phpcs, 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}/
AllTests" passthru="true" checkreturn="true" />
</target>
</project>