This repository was archived by the owner on Feb 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.xml
More file actions
114 lines (101 loc) · 4.35 KB
/
build.xml
File metadata and controls
114 lines (101 loc) · 4.35 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Set some basic project information and targets -->
<project name="GenjThumbnailBundle" default="build">
<target name="build" depends="prepare, lint, vendors, phpunit, phpcs, phpdoc, pdepend, phpcb, phpcpd, phploc, phpmd"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="build/coverage"/>
<delete dir="build/logs"/>
<delete dir="build/api"/>
<delete dir="build/docs"/>
<delete dir="build/pdepend"/>
</target>
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="build/coverage"/>
<mkdir dir="build/logs"/>
<mkdir dir="build/api"/>
<mkdir dir="build/docs"/>
<mkdir dir="build/pdepend"/>
</target>
<target name="lint" depends="prepare" description="Perform syntax check of sourcecode files">
<phplint level="info">
<fileset dir=".">
<include name="**/*.php"/>
<exclude name="**/vendor/**"/>
</fileset>
</phplint>
</target>
<target name="vendors" depends="lint" description="Update vendors">
<exec executable="composer" checkreturn="true" passthru="true">
<arg line="update"/>
</exec>
</target>
<target name="phpunit">
<exec executable="phpunit" checkreturn="true" passthru="true">
<arg line="--verbose"/>
</exec>
</target>
<target name="phpcs" description="Run PHP_CodeSniffer">
<exec executable="phpcs" passthru="true">
<arg line="--ignore=vendor/*,build/*,Tests/Fixtures/*,.svn/*,.git/*"/>
<arg line="--report=checkstyle"/>
<arg line="--report-file=build/logs/checkstyle.xml"/>
<arg line="--standard=Symfony2"/>
<arg path="."/>
</exec>
</target>
<target name="phpdoc" description="Run phpDocumentor">
<exec executable="phpdoc" passthru="true">
<arg line="-i 'vendor/,build/,Tests/Fixtures/,.svn/,.git/'"/>
<arg line="-d '.'"/>
<arg line="-t 'build/docs'"/>
</exec>
</target>
<target name="pdepend" description="Run PHP_Depend">
<exec executable="pdepend" passthru="true">
<arg line="--ignore=vendor/*,build/*,Tests/Fixtures/*,.svn/*,.git/"/>
<arg line="--jdepend-xml=build/logs/jdepend.xml"/>
<arg line="--jdepend-chart=build/pdepend/dependencies.svg"/>
<arg line="--overview-pyramid=build/pdepend/overview-pyramid.svg"/>
<arg path="." />
</exec>
</target>
<target name="phpcb" description="Aggregate tool output with PHP_CodeBrowser">
<exec executable="phpcb" passthru="true">
<arg line="--ignore=vendor,build,Tests/Fixtures,.svn,.git"/>
<arg line="--log build/logs"/>
<arg line="--source ."/>
<arg line="--output build/code-browser"/>
</exec>
</target>
<target name="phpcpd" description="Find duplicate code using PHPCPD">
<exec executable="phpcpd" passthru="true">
<arg line="--exclude=vendor"/>
<arg line="--exclude=build"/>
<arg line="--exclude=Tests/Fixtures"/>
<arg line="--exclude=.svn"/>
<arg line="--exclude=.git"/>
<arg line="--log-pmd build/logs/pmd-cpd.xml"/>
<arg path="."/>
</exec>
</target>
<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc" passthru="true">
<arg line="--exclude=vendor"/>
<arg line="--exclude=build"/>
<arg line="--exclude=Tests/Fixtures"/>
<arg line="--exclude=.svn"/>
<arg line="--exclude=.git"/>
<arg line="--log-csv build/logs/phploc.csv"/>
<arg path="."/>
</exec>
</target>
<target name="phpmd" description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="phpmd" passthru="true">
<arg path="." />
<arg line="xml" />
<arg line="codesize,design,naming,unusedcode" />
<arg line="--reportfile build/logs/pmd.xml" />
<arg line="--exclude vendor,build,Tests/Fixtures,.svn,.git" />
</exec>
</target>
</project>