forked from DSB/MySQLDumper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
114 lines (100 loc) · 3.44 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
<project name="MySQLDumper2" default="build" basedir="./../">
<property name="repodir" value="${basedir}/trunk" />
<property name="logdir" value="${basedir}/build" />
<target name="clean">
<delete dir="${lodir}" />
<mkdir dir="${logdir}" />
<mkdir dir="${logdir}/api" />
<mkdir dir="${logdir}/coverage" />
<mkdir dir="${logdir}/logs" />
<mkdir dir="${logdir}/pdepend" />
</target>
<!-- Run unit tests and generate junit.xml and clover.xml -->
<target name="phpunit">
<exec dir="${repodir}/tests" executable="phpunit" failonerror="false">
<arg line="--verbose --config ${repodir}/tests/phpunit.xml" />
</exec>
</target>
<!-- Generate checkstyle.xml -->
<target name="phpcs">
<exec executable="phpcs">
<arg line="--report=checkstyle
--report-file=${logdir}/logs/checkstyle.xml
--standard=Zend
--extensions=php
--ignore=*/lang.php,*/library/Zend/*,*/library/ZendX/*,*/tests/*
./
"/>
</exec>
</target>
<!-- can be used if code sniffer is updated on hudson -->
<target name="phpcs-new">
<exec executable="phpcs">
<arg line="--report=checkstyle
--report-file=${logdir}/logs/checkstyle.xml
--standard={repodir}/tests/Zend.xml
--extensions=php
--ignore=*/lang.php,*/library/Zend/*,*/library/ZendX/*,*/tests/*
./
"/>
</exec>
</target>
<!-- Generate jdepend.xml and software metrics charts -->
<target name="pdepend">
<touch file="${logdir}/logs/jdepend.xml" mkdirs="true" />
<exec executable="pdepend">
<arg line="--jdepend-xml=${logdir}/logs/jdepend.xml
--ignore=language,Zend,ZendX,work,tests
--suffix=php
--jdepend-chart=${logdir}/pdepend/dependencies.svg
--overview-pyramid=${logdir}/pdepend/overview-pyramid.svg
${repodir}" />
</exec>
</target>
<!-- Generate pmd.xml - exclude */Zend/*,*/language/* -->
<target name="phpmd">
<touch file="${logdir}/logs/pmd.xml" mkdirs="true" />
<exec executable="phpmd">
<arg line="./ xml codesize,unusedcode,design,naming
--reportfile ${logdir}/logs/pmd.xml
--suffixes php
--exclude ${repodir}/application/language/*,
${repodir}/library/Zend/*,
${repodir}/library/ZendX/*,
${repodir}/work/*,${repodir}/tests/*
"/>
</exec>
</target>
<!-- Generate pmd-cpd.xml -->
<target name="phpcpd">
<exec executable="phpcpd">
<arg line="--log-pmd ${logdir}/logs/pmd-cpd.xml
--names *.php
--exclude ${repodir}/library/Zend
--exclude ${repodir}/application/language
--exclude ${repodir}/library/ZendX
--exclude ${repodir}/tests
./" />
</exec>
</target>
<target name="phploc" description="Generate phploc.csv">
<exec executable="phploc">
<arg line="--log-csv ${logdir}/logs/phploc.csv ${repodir}
--exclude ${repodir}/library/Zend
--exclude ${repodir}/application/language
--exclude ${repodir}/library/ZendX
--exclude ${repodir}/tests
" />
</exec>
</target>
<!-- Generate API documentation -->
<target name="phpdoc">
<exec executable="phpdoc">
<arg line="-d ${repodir}
-t ${logdir}/api
-ti 'MySQLDumper2 Code Documentation'
-s
-i language/,Zend/,ZendX/,*.phtml,tests/,index.php,flag.php,Debug.php,bootstrap.php,work/" />
</exec>
</target>
</project>