-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.xml
42 lines (37 loc) · 1.31 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
<?xml version="1.0" encoding="utf-8"?>
<project name="Teknomavi Kargo" default="build">
<target name="build" depends="prepare,lint,phpcs" />
<target name="clean">
<delete dir="${basedir}/.build" />
<delete dir="${basedir}/.build/log" />
</target>
<target name="prepare" depends="clean">
<mkdir dir="${basedir}/.build" />
<mkdir dir="${basedir}/.build/log" />
</target>
<target name="phpmd">
<exec executable="${basedir}/vendor/bin/phpmd" failonerror="true">
<arg path="${basedir}/src" />
<arg value="text" />
<arg value="codesize,unusedcode,naming" />
<arg value="--reportfile" />
<arg value="${basedir}/.build/log/phpmd.log" />
</exec>
</target>
<target name="phpcs">
<exec executable="${basedir}/vendor/bin/phpcs">
<arg line="--standard=PSR2" />
<arg line="--report=full" />
<arg line="--report-file=${basedir}/.build/log/cs.log" />
<arg line="src/" />
</exec>
</target>
<target name="lint">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/src">
<include name="*/*.php" />
</fileset>
</apply>
</target>
</project>