forked from DSB/MySQLDumper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.vm.xml
100 lines (90 loc) · 3.14 KB
/
build.vm.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
<project name="MySQLDumper2" default="build" basedir="/home/jenkins/msd">
<property name="repodir" value="${basedir}/svn" />
<property name="builddir" value="${basedir}/build" />
<property name="logdir" value="${basedir}/build/logs" />
<target name="clean">
<delete dir="${builddir}" />
<delete dir="${logdir}" />
<mkdir dir="${builddir}" />
<mkdir dir="${builddir}/api" />
<mkdir dir="${builddir}/coverage" />
<mkdir dir="${builddir}/pdepend" />
<mkdir dir="${logdir}" />
</target>
<!-- Run unit tests and generate junit.xml and clover.xml -->
<target name="phpunit">
<exec dir="${repodir}/tests" executable="phpunit" failonerror="false">
<arg line="-c ${repodir}/tests/phpunit.vm.xml" />
</exec>
</target>
<!-- Run Code Sniffer and check coding style -->
<target name="phpcs">
<exec executable="phpcs">
<arg line="--report=checkstyle
--report-file=${logdir}/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}/jdepend.xml" mkdirs="true" />
<exec dir="${repodir}" executable="pdepend">
<arg line="--jdepend-xml=${logdir}/jdepend.xml
--ignore=language,Zend,ZendX,work,tests
--suffix=php
--jdepend-chart=${builddir}/pdepend/dependencies.svg
--overview-pyramid=${builddir}/pdepend/overview-pyramid.svg
${repodir}" />
</exec>
</target>
<!-- Generate pmd.xml - exclude */Zend/*,*/language/* -->
<target name="phpmd">
<touch file="${logdir}/pmd.xml" mkdirs="true" />
<exec dir="${repodir}" executable="phpmd">
<arg line="${repodir}/ xml codesize,unusedcode,design,naming
--reportfile ${builddir}/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 dir="${repodir}" executable="phpcpd">
<arg line="--log-pmd ${logdir}/pmd-cpd.xml
--names *.php
--exclude application/language
--exclude library/Zend
--exclude library/ZendX
--exclude tests
./" />
</exec>
</target>
<target name="phploc" description="Generate phploc.csv">
<exec executable="phploc">
<arg line="--log-csv ${logdir}/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 ${builddir}/api
-ti 'MySQLDumper2 Code Documentation'
-s
-i language/,Zend/,ZendX/,*.phtml,tests/,index.php,flag.php,Debug.php,bootstrap.php,work/" />
</exec>
</target>
</project>