-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
61 lines (54 loc) · 2.6 KB
/
build.xml
File metadata and controls
61 lines (54 loc) · 2.6 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="albertdoncelis/ddd-php" default="build">
<property name="source" value="src/AlbertDonCelis/"/>
<property name="phpcs.reportsdir" value="${project.basedir}/build/logs/phpcs"/>
<property name="phpmd.reportsdir" value="${project.basedir}/build/logs/phpmd"/>
<property name="phpcpd.reportsdir" value="${project.basedir}/build/logs/phpcpd"/>
<property name="coverage.reportsdir" value="${project.basedir}/build/logs/phpspec_coverage"/>
<target name="build" depends="main"/>
<target name="main">
<phingcall target="build reset"></phingcall>
<phingcall target="phpcbf"></phingcall>
<phingcall target="PSR2 coding standard compliance"></phingcall>
<phingcall target="clean code violations"></phingcall>
<phingcall target="run Phpspec testing"></phingcall>
</target>
<target name="build reset">
<delete dir="${phpcs.reportsdir}" quiet="true"></delete>
<delete dir="${phpcpd.reportsdir}" quiet="true"></delete>
<delete dir="${phpmd.reportsdir}" quiet="true"></delete>
<delete dir="${coverage.reportsdir}" quiet="true"></delete>
<mkdir dir="${phpcs.reportsdir}"></mkdir>
<mkdir dir="${phpcpd.reportsdir}"></mkdir>
<mkdir dir="${phpmd.reportsdir}"></mkdir>
<mkdir dir="${coverage.reportsdir}"></mkdir>
</target>
<target name="phpcbf">
<exec logoutput="false"
checkreturn="false"
passthru="false"
command="'${project.basedir}/bin/phpcbf' --standard=PSR2 '${source}'"/>
</target>
<target name="PSR2 coding standard compliance">
<exec logoutput="false"
checkreturn="false"
passthru="false"
command="'${project.basedir}/bin/phpcs' '${source}' --standard=PSR2 --report-full='${phpcs.reportsdir}/report.txt'"/>
</target>
<target name="clean code violations" description="Detect clean code violations">
<exec
logoutput="false"
checkreturn="true"
passthru="false"
command="'${project.basedir}/bin/phpmd' '${source}' html '${project.basedir}/phpmd.xml' --reportfile '${phpmd.reportsdir}/index.html'"
/>
</target>
<target name="run Phpspec testing" description="Detect clean code violations">
<exec
logoutput="false"
checkreturn="true"
passthru="false"
command="'${project.basedir}/bin/phpspec' run --config '${project.basedir}/phpspec.codecoverage.yml' --no-ansi"
/>
</target>
</project>