forked from marcelog/PAMI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
261 lines (248 loc) · 7.02 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<project name="PAMI" default="all" basedir=".">
<property file="./build.properties"/>
<target name="prepare" depends="clean">
<mkdir dir="${dir.output}"/>
<mkdir dir="${dir.tmp}"/>
</target>
<target name="clean">
<delete dir="${dir.output}"/>
</target>
<target name="phpdepend">
<exec command="${phing} _phpdepend" passthru="true"/>
</target>
<target name="_phpdepend">
<mkdir dir="${phpdepend.output.xml.dir}"/>
<mkdir dir="${phpdepend.output.html.dir}"/>
<exec
command="${phpdepend.exec} ${phpdepend.args}"
dir="${project.basedir}"
passthru="true"
/>
<xslt
file="${phpdepend.output.xml.file}"
tofile="${phpdepend.output.html.file}"
style="${phpdepend.style}"
/>
</target>
<target name="phpcs">
<exec command="${phing} _phpcs" passthru="true"/>
</target>
<target name="_phpcs">
<mkdir dir="${phpcs.output.xml.dir}"/>
<mkdir dir="${phpcs.output.html.dir}"/>
<exec
command="${phpcs.exec} ${phpcs.args}"
dir="${project.basedir}"
passthru="true"
/>
<xslt
file="${phpcs.output.xml.file}"
tofile="${phpcs.output.html.file}"
style="${phpcs.style}"
/>
</target>
<target name="phpunit">
<exec command="${phing} _phpunit" passthru="true"/>
</target>
<target name="_phpunit">
<mkdir dir="${phpunit.output.xml.dir}"/>
<mkdir dir="${phpunit.output.html.dir}"/>
<exec
command="${phpunit.exec} ${phpunit.args}"
dir="${project.basedir}/test"
passthru="true"
/>
<xslt
file="${phpunit.output.xml.file}"
tofile="${junit.output.xml.file}"
style="${junit.style}"
/>
</target>
<target name="phpmd">
<exec command="${phing} _phpmd" passthru="true"/>
</target>
<target name="_phpmd">
<mkdir dir="${phpmd.output.xml.dir}"/>
<mkdir dir="${phpmd.output.html.dir}"/>
<exec
command="${phpmd.exec} ${phpmd.args}"
dir="${project.basedir}"
passthru="true"
/>
<xslt
file="${phpmd.output.xml.file}"
tofile="${phpmd.output.html.file}"
style="${phpmd.style}"
/>
</target>
<target name="phpcpd">
<exec command="${phing} _phpcpd" passthru="true"/>
</target>
<target name="_phpcpd">
<mkdir dir="${phpcpd.output.xml.dir}"/>
<mkdir dir="${phpcpd.output.html.dir}"/>
<exec
command="${phpcpd.exec} ${phpcpd.args}"
dir="${project.basedir}"
passthru="true"
/>
<xslt
file="${phpcpd.output.xml.file}"
tofile="${phpcpd.output.html.file}"
style="${phpcpd.style}"
/>
</target>
<target name="phpdoc">
<exec command="${phing} _phpdoc" passthru="true"/>
</target>
<target name="_phpdoc">
<mkdir dir="${phpdoc.output.html.dir}"/>
<exec
command="${phpdoc.exec} ${phpdoc.args}"
dir="${project.basedir}"
passthru="true"
/>
</target>
<target name="phploc">
<exec command="${phing} _phploc" passthru="true"/>
</target>
<target name="_phploc">
<mkdir dir="${phploc.output.html.dir}"/>
<exec
command="${phploc.exec} ${phploc.args} > ${phploc.output.html.file}"
dir="${project.basedir}"
passthru="true"
/>
</target>
<target name="package">
<exec command="${phing} _package" passthru="true"/>
</target>
<target name="_package">
<mkdir dir="${package.output.dir}"/>
<exec
command="${pear.exec} channel-discover pear.marcelog.name"
dir="${project.basedir}" passthru="true"
/>
<exec
command="${genphar.exec} ${genphar.args}"
dir="${project.basedir}"
passthru="true"
/>
<exec
command="${genpear.exec}" dir="${project.basedir}" passthru="true"
output="${dir.output}/package.xml"
/>
<copy file="${dir.output}/package.xml" tofile="${dir.src}/package.xml" />
<exec
command="${pear.exec} package" dir="${dir.src}" passthru="true"
/>
<delete file="${dir.src}/package.xml" />
<move file="${dir.src}/${peartgz}" tofile="${dir.output}/${peartgz}" overwrite="true"/>
</target>
<target name="install-dependencies">
<mkdir dir="${dir.vendor}"/>
<exec
command="${defaultpear.bin} config-create ${dir.vendor} ${dir.vendor}/.pearrc"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set php_bin ${php.bin}"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set php_dir ${dir.vendor}/php"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set bin_dir ${dir.vendor}/bin"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set cache_dir ${dir.vendor}/cache"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set cfg_dir ${dir.vendor}/cfg"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set data_dir ${dir.vendor}/data"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set download_dir ${dir.vendor}/download"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set temp_dir ${dir.vendor}/tmp"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set doc_dir ${dir.vendor}/doc"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set test_dir ${dir.vendor}/test"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set www_dir ${dir.vendor}/www"
passthru="true"
/>
<exec
command="${defaultpear.exec} config-set auto_discover 1"
passthru="true"
/>
<exec
command="${defaultpear.exec} install pear"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.phpunit.de/PHPUnit"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.marcelog.name/PAGI"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps phpunit/phploc"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.docblox-project.org/DocBlox"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.pdepend.org/PHP_Depend-beta"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.phpmd.org/PHP_PMD"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.phpunit.de/phpcpd"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps PHP_CodeSniffer"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.phing.info/phing"
passthru="true"
/>
<exec
command="${pear.exec} install --alldeps pear.apache.org/log4php/Apache_log4php"
passthru="true"
/>
</target>
<target name="clean-dependencies">
<delete dir="${dir.vendor}"/>
</target>
<target name="all" depends="clean, prepare, package, report"/>
<target name="build" depends="prepare, test"/>
<target name="test" depends="prepare, phpunit"/>
<target name="report" depends="build, phploc, phpdoc, phpdepend, phpcs, phpmd, phpcpd"/>
</project>