forked from opencart/opencart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
42 lines (36 loc) · 1.55 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="OpenCart" default="build" basedir=".">
<property name="source" value="upload"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/tests/docs"/>
<delete dir="${basedir}/tests/logs"/>
<delete dir="${basedir}/tests/testresults"/>
</target>
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/tests/docs"/>
<mkdir dir="${basedir}/tests/logs"/>
<mkdir dir="${basedir}/tests/testresults"/>
</target>
<target name="lint" description="Perform syntax check of source code files">
<apply executable="php" failonerror="true">
<arg value="-l"/>
<fileset dir="${basedir}/upload">
<include name="**/*.php"/>
<modified/>
</fileset>
</apply>
</target>
<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc">
<arg value="--log-csv"/>
<arg value="${basedir}/tests/logs/phploc.csv"/>
<arg path="${basedir}/upload"/>
</exec>
</target>
<target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
<exec executable="phpcs">
<arg line="--report=checkstyle --report-file=${basedir}/tests/logs/checkstyle.xml --standard=tests/phpcs.xml --extensions=php ${source}/"/>
</exec>
</target>
<target name="build" depends="prepare,phpcs,lint,phploc"/>
</project>