forked from contao-community-alliance/composer-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
46 lines (41 loc) · 1.95 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
43
44
45
46
<?xml version="1.0"?>
<project name="composer client" default="test">
<target name="phpunit">
<exec dir="${basedir}" executable="vendor/bin/phpunit" failonerror="false"/>
</target>
<target name="phpcs">
<exec dir="${basedir}" executable="vendor/bin/phpcs" failonerror="true">
<arg line="--standard=PSR1,PSR2 ${basedir}/src"/>
<!--
The config.php declare symbols (constants) and execute logic with side effects.
Unfortunately its impossible to change this, within contao, so we ignore this here.
-->
<arg line="--ignore=src/system/modules/!composer/config/config.php"/>
<!--
The class Contao2ClassFileExistsHack is a little shared helper class, that we be ignored here.
-->
<arg line="--ignore=src/system/modules/!composer/Contao2ClassFileExistsHack.php"/>
<!--
These language files are generated, we ignore them.
-->
<arg line="--ignore=src/system/modules/!composer/languages/de/*"/>
<arg line="--ignore=src/system/modules/!composer/languages/fr/*"/>
<arg line="--ignore=src/system/modules/!composer/languages/ru/*"/>
<arg line="--ignore=src/system/modules/!composer/languages/rm/*"/>
</exec>
</target>
<target name="phpmd">
<exec dir="${basedir}" executable="vendor/bin/phpmd" failonerror="true">
<arg line="${basedir}/src text naming,unusedcode --suffixes php"/>
</exec>
</target>
<target name="branch-alias">
<exec dir="${basedir}" executable="vendor/bin/validate-branch-alias.php" failonerror="true"/>
</target>
<target name="composer-validate">
<exec dir="${basedir}" executable="composer" failonerror="true">
<arg value="validate"/>
</exec>
</target>
<target name="test" depends="phpunit,phpcs,phpmd,branch-alias,composer-validate"/>
</project>