forked from modulargaming/modulargaming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
77 lines (66 loc) · 2.95 KB
/
Copy pathbuild.xml
File metadata and controls
77 lines (66 loc) · 2.95 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Modular Gaming" default="build">
<target name="build" depends="prepare, phploc, phpcs" />
<target name="build-ci" depends="prepare, phploc-ci, phpcs-ci" />
<target name="prepare" depends="clean" description="Create the directories required for building.">
<mkdir dir="${basedir}/build/logs"/>
</target>
<target name="clean" description="Delete the old build paths to prepare for the new.">
<delete dir="${basedir}/build/logs"/>
</target>
<!-- Command line builds -->
<target name="phploc" description="Output the project size using PHPLOC">
<exec executable="vendor/bin/phploc">
<arg path="${basedir}/application/classes" />
<arg path="${basedir}/modulargaming" />
</exec>
</target>
<target name="phpcs" description="Check the codestyle using PHP_CodeSniffer">
<exec executable="vendor/bin/phpcs">
<arg value="--standard=${basedir}/build/cs/PHP/CodeSniffer/Standards/Kohana" />
<arg value="--ignore=*/tests/features/*" />
<arg path="${basedir}/application/classes" />
<arg path="${basedir}/modulargaming" />
</exec>
</target>
<target name="phpcs-html" depends="prepare, phpcs-ci" description="Generate a html report from the checkstyle.xml file">
<xslt in="${basedir}/build/logs/checkstyle.xml" out="${basedir}/build/phpcs-report.html"
style="${basedir}/build/checkstyle-noframes.xsl"/>
</target>
<!-- Automated builds -->
<target name="phploc-ci" description="Measure project size using PHPLOC">
<exec executable="vendor/bin/phploc">
<arg value="--log-csv" />
<arg value="${basedir}/build/logs/phploc.csv" />
<arg path="${basedir}/application/classes" />
<arg path="${basedir}/modulargaming" />
</exec>
</target>
<target name="phpcs-ci" description="Generate checkstyle.xml using PHP_CodeSniffer">
<exec executable="vendor/bin/phpcs">
<arg value="--report=checkstyle" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=${basedir}/build/cs/PHP/CodeSniffer/Standards/Kohana" />
<arg value="--ignore=*/tests/features/*" />
<arg path="${basedir}/application/classes" />
<arg path="${basedir}/modulargaming" />
</exec>
</target>
<target name="cs-fixer-dry" description="Runs PHP Coding Standard Fixer with --dry-run (list changes only)">
<exec executable="../cs/php-cs-fixer">
<arg value="fix" />
<arg value="--dry-run" />
<arg value="--fixers=linefeed, trailing_spaces, php_closing_tag, short_tag, return, visibility, braces,
eof_ending, controls_spaces, elseif, caps" />
<arg path="${basedir}/modulargaming" />
</exec>
</target>
<target name="cs-fixer" description="Runs PHP Coding Standard Fixer">
<exec executable="../cs/php-cs-fixer">
<arg value="fix" />
<arg value="--fixers=linefeed, trailing_spaces, php_closing_tag, short_tag, return, visibility, braces,
eof_ending, controls_spaces, elseif, caps" />
<arg path="${basedir}/modulargaming" />
</exec>
</target>
</project>