forked from marcelog/PAMI
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.xml
67 lines (55 loc) · 2.45 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0"?>
<!-- phing build file -->
<project
name="pami"
default="build"
basedir="."
description="PAMI Asterisk Manager Interface (AMI) client for PHP">
<target name="install">
<exec command="./composer.phar install" checkreturn="true" passthru="true"/>
<exec command="./composer.phar update" checkreturn="true" passthru="true"/>
</target>
<target name="clean">
<delete dir="build"/>
</target>
<target name="prepare">
<mkdir dir="build" mode="0755"/>
<mkdir dir="build/doc" mode="0755"/>
<mkdir dir="build/doc/phpdox" mode="0755"/>
<mkdir dir="build/logs" mode="0755"/>
<mkdir dir="build/coverage-html" mode="0755"/>
<mkdir dir="build/coverage-xml" mode="0755"/>
</target>
<target name="cpd">
<exec command="vendor/bin/phpcpd --fuzzy src --exclude src/PAMI/Message/Event --exclude PAMI/Message/Event" checkreturn="true" passthru="true"/>
</target>
<target name="md">
<exec command="vendor/bin/phpmd ./src text cleancode,codesize,controversial,design,naming,unusedcode"
checkreturn="false"
passthru="true"/>
</target>
<target name="cs">
<exec command="vendor/bin/phpcs --standard=PSR2 --tab-width=4 --exclude=Generic.Files.LineLength src/*"
checkreturn="true"
passthru="true"/>
</target>
<target name="dochtml">
<exec command="vendor/bin/phploc --log-xml=build/phploc.xml ./src" checkreturn="true" passthru="false"/>
<exec command="vendor/bin/phpdox" checkreturn="true" passthru="true"/>
</target>
<target name="docmd">
<!--<exec command="vendor/bin/phpdoc-md generate src > doc/api.md" checkreturn="true" passthru="false"/>-->
<!--<exec command="vendor/bin/phpmd generate src > doc/api.md" checkreturn="true" passthru="false"/>-->
<!--<exec command="vendor/bin/phpdoc -d src -t doc/ \-\-template='xml'" checkreturn="true" passthru="false"/>-->
<!--<exec command="vendor/bin/phpdocmd docs/structure.xml doc/" checkreturn="true" passthru="false"/>-->
</target>
<target name="fixstyle">
<exec command="phpcbf --tab-width=4 --standard=PSR2 src test" checkreturn="true" passthru="false"/>
</target>
<target name="test">
<exec command="vendor/bin/phpunit -v --debug -c test/resources/phpunit.xml" checkreturn="true" passthru="true"/>
</target>
<target name="build" depends="clean, prepare, cpd, cs, md, doc, test"/>
<target name="travis" depends="clean, prepare, cpd, cs, test"/>
<target name="doc" depends="dochtml, docmd"/>
</project>