forked from marcelog/PAMI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
78 lines (66 loc) · 2.27 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
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0"?>
<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/xml" mode="0755"/>
<mkdir dir="build/doc/html" mode="0755"/>
<mkdir dir="build/doc/md" mode="0755"/>
<mkdir dir="build/logs" mode="0755"/>
<mkdir dir="build/coverage-html" mode="0755"/>
</target>
<target name="cpd">
<exec command="vendor/bin/phpcpd --fuzzy src --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 src/*"
checkreturn="true"
passthru="true"/>
</target>
<target name="docxml">
<exec command="vendor/bin/phpdoc --template=xml -t build/doc/xml -d src --validate --sourcecode --force --log"
checkreturn="true"
passthru="true"/>
</target>
<target name="dochtml">
<exec command="vendor/bin/phpdoc -t build/doc/html -d src --validate --sourcecode --force --log"
checkreturn="true"
passthru="true"/>
</target>
<target name="docmd">
<exec dir="build/doc/md" command="../../../vendor/bin/phpdocmd ../xml/structure.xml"
checkreturn="true"
passthru="true"/>
<copy todir="doc" overwrite="true">
<fileset dir="build/doc/md">
<include name="*.md" />
</fileset>
</copy>
</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="docxml, dochtml, docmd"/>
</project>