Repository navigation
Expand file tree
/
Copy pathcommon.xml
More file actions
130 lines (111 loc) · 5.22 KB
/
Copy pathcommon.xml
File metadata and controls
130 lines (111 loc) · 5.22 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0"?>
<project name="common" basedir="." default="clean">
<!-- ============================================ -->
<!-- commons setup -->
<!-- ============================================ -->
<php function="dirname" returnProperty="phing.commons.root" level="debug">
<param value="${phing.file.common}"/>
</php>
<!-- ============================================ -->
<!-- project properties -->
<!-- ============================================ -->
<php function="dirname" returnProperty="project.root" level="debug">
<param value="${phing.file}"/>
</php>
<resolvepath propertyName="project.root" file="${project.root}"/>
<!-- ============================================ -->
<!-- fileset definition -->
<!-- ============================================ -->
<fileset id="all" dir="${project.root}">
<include name="config/**/*.php"/>
<include name="module/**/*.php"/>
<include name="src/**/*.php"/>
<include name="tests/**/*.php"/>
</fileset>
<property name="validation.fileset" value="all" override="true"/>
<!-- ============================================ -->
<!-- directory settings -->
<!-- ============================================ -->
<property name="project.vendor" value="${project.root}/vendor" override="true"/>
<property name="project.bin" value="${project.root}/vendor/bin" override="true"/>
<property name="project.src" value="${project.root}/src" override="true"/>
<property name="project.test" value="${project.root}/tests" override="true"/>
<property name="project.build" value="${project.root}/build" override="true"/>
<property name="project.phpdoc" value="${project.build}/phpdoc" override="true"/>
<property name="project.testreport" value="${project.build}/testreport" override="true"/>
<property name="project.coverage" value="${project.build}/coverage" override="true"/>
<property file="${phing.commons.root}/build.properties.dist" override="true"/>
<if>
<available file="${project.root}/build.properties"/>
<then>
<property file="${project.root}/build.properties" override="true"/>
</then>
</if>
<if>
<available file="${project.root}/build.properties.local"/>
<then>
<property file="${project.root}/build.properties.local"/>
</then>
</if>
<import file="${project.vendor}/bitexpert/phing-securitychecker/build.xml"/>
<import file="${phing.commons.root}/targets/test/phpunit.xml"/>
<import file="${phing.commons.root}/targets/phpmd/phpmd.xml"/>
<import file="${phing.commons.root}/targets/phpcpd/phpcpd.xml"/>
<import file="${phing.commons.root}/targets/phploc/phploc.xml"/>
<import file="${phing.commons.root}/targets/test/checksyntax.xml"/>
<import file="${phing.commons.root}/targets/codestyle/checkstyle.xml"/>
<import file="${phing.commons.root}/targets/phpdoc/phpdoc.xml"/>
<target name="clean" description="cleans the workspace">
<delete dir="${project.build}" includeemptydirs="true" failonerror="false"/>
</target>
<target name="prepare" description="prepares build directory with required folders">
<mkdir dir="${project.build}"/>
<mkdir dir="${project.phpdoc}"/>
</target>
<target name="test" depends="clean, prepare" description="run all tests">
<phingcall target="test.checksyntax"/>
<phingcall target="test.phpunit"/>
</target>
<target name="checkstyle" depends="clean, prepare" description="run a style check">
<phingcall target="codestyle.checkstyle"/>
</target>
<target name="build" description="run full build chain">
<phingcall target="clean"/>
<phingcall target="prepare"/>
<phingcall target="test.checksyntax"/>
<phingcall target="test.phpunit"/>
<phingcall target="codestyle.checkstyle"/>
</target>
<target name="build-ci" description="run full build chain including reports">
<phingcall target="clean"/>
<phingcall target="prepare"/>
<phingcall target="test.checksyntax"/>
<phingcall target="test.phpunit"/>
<phingcall target="codestyle.checkstyle"/>
<phingcall target="phpcpd"/>
<phingcall target="phploc"/>
<phingcall target="phpmd"/>
</target>
<target name="security-check">
<if>
<equals arg1="${security-check.enabled}" arg2="true"/>
<then>
<securitychecker lockfile="composer.lock"/>
</then>
<else>
<echo level="warning" message="skipping because target is disabled."/>
</else>
</if>
</target>
<target name="compatibility:check" description="check the php compatiblity ">
<phpcodesniffer
standard="vendor/wimg/php-compatibility/PHPCompatibility"
format="summary" skipversioncheck="true"
showSniffs="true" showWarnings="true"
haltonerror="true">
<fileset refid="phpcompat"/>
<formatter type="full" usefile="false"/>
<formatter type="checkstyle" outfile="${project.build}/checkstyle-codesniffer.xml"/>
</phpcodesniffer>
</target>
</project>