-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
62 lines (55 loc) · 1.99 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="OverblogWsClientBundle" basedir="." default="prepare">
<property name="builddir" value="${ws}/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" />
<exec command="git submodule update --init"
dir="${ws}" />
</target>
<!-- PHP API Documentation -->
<target name="phpdoc">
<echo msg="PHP Documentor..." />
<phpdoc title="API Documentation"
destdir="${builddir}/docs"
sourcecode="yes"
defaultpackagename="OverblogWsClientBundle"
output="HTML:Smarty:PHP"
quiet="true" >
<fileset dir="${ws}">
<include name="**/*.php" />
<exclude name="build/**" />
<exclude name="Tests/**" />
<exclude name="Fixtures/**" />
</fileset>
</phpdoc>
</target>
<!-- PHP copy/paste analysis -->
<target name="phpcpd">
<echo msg="PHP Copy/Paste..." />
<exec command="phpcpd --log-pmd ${builddir}/logs/pmd.xml --exclude build --exclude Tests --exclude Fixtures ${ws}" escape="false" />
</target>
<!-- PHP dependency checker -->
<target name="pdepend">
<echo msg="PHP Depend..." />
<exec command="pdepend --jdepend-xml=${builddir}/logs/jdepend.xml --ignore=build,Tests,Fixtures ${ws}" escape="false" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<echo msg="PHP CodeSniffer..." />
<exec command="phpcs --standard=Symfony2 --ignore=build,Tests,Fixtures --report=checkstyle --extensions=php ${ws} > ${builddir}/logs/checkstyle.xml" escape="false" />
</target>
<!-- Unit Tests & coverage analysis -->
<target name="phpunit">
<echo msg="PHP Unit..." />
<exec command="phpunit -c . --log-junit ${builddir}/logs/phpunit.xml --coverage-clover ${builddir}/logs/coverage/clover.xml --coverage-html ${builddir}/logs/coverage/"
logoutput="TRUE" />
</target>
</project>