-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
96 lines (84 loc) · 4.48 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
<?xml version="1.0" ?>
<project name="Doctrine_Template_Positionable" 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.2.3" />
<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="Cloning git repository" />
<exec command="git clone git://github.com/intraface/Doctrine_Template_Positionable.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>Makes doctrine records positionable</summary>
<channel>${pear.channel}</channel>
<description>A template for Doctrine Record to make the records positionable, having a field to order the list by, and giving methods to move a record up and down and to a specific position</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="Doctrine" channel="pear.doctrine-project.org" recommended_version="" minimum_version="1.2.2" />
</dependencies>
<notes>* Updated dependency for doctrine pear package</notes>
</d51pearpkg2>
</target>
<target name="build" depends="prepare, export, 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 ." passthru="true" checkreturn="true" />
</target>
</project>