forked from joindin/joindin-legacy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
67 lines (57 loc) · 2.09 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="joindin" basedir="." default="app">
<property name="builddir" value="./build" />
<target name="clean">
<echo msg="Clean..." />
<delete dir="${builddir}" />
</target>
<target name="prepare">
<echo msg="Prepare..." />
<mkdir dir="${builddir}" />
<mkdir dir="${builddir}/logs" />
<mkdir dir="${builddir}/logs/coverage" />
<mkdir dir="${builddir}/docs" />
</target>
<!-- PHP API Documentation -->
<target name="phpdoc">
<echo msg="PHP Documentor..." />
<phpdoc title="API Documentation"
destdir="${builddir}/docs"
sourcecode="yes"
defaultpackagename="MHTest"
output="HTML:Smarty:PHP">
<fileset dir="./src/system/application">
<include name="**/*.php" />
</fileset>
</phpdoc>
</target>
<!-- PHP copy/paste analysis -->
<target name="phpcpd">
<echo msg="PHP Copy/Paste..." />
<exec command="phpcpd --log-pmd ${builddir}/logs/pmd.xml src/system/application" escape="false" logoutput="true" />
</target>
<!-- PHP dependency checker -->
<target name="pdepend">
<echo msg="PHP Depend..." />
<exec command="pdepend --jdepend-xml=${builddir}/logs/jdepend.xml ./src/system/application" escape="false" logoutput="true" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<echo msg="PHP CodeSniffer..." />
<exec command="phpcs --standard=ZEND --report=checkstyle ./src/system/application > ${builddir}/logs/checkstyle.xml" escape="false" logoutput="true" />
</target>
<!-- PHP mess detector -->
<target name="phpmd">
<exec command="phpmd ./src/system/application xml codesize > ${builddir}/logs/phpmd.xml" logoutput="true" />
</target>
<!-- Unit Tests -->
<target name="phpunit">
<echo msg="PHP Unit..." />
<exec command="phpunit ./src/tests" logoutput="true" />
</target>
<!-- Full reported unit tests & coverage analysis -->
<target name="fullphpunit">
<echo msg="PHP Unit..." />
<exec command="phpunit --log-junit ${builddir}/logs/phpunit.xml --coverage-clover ${builddir}/logs/coverage/clover.xml --coverage-html ${builddir}/logs/coverage/ ./src/tests" logoutput="true" />
</target>
</project>