-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
111 lines (94 loc) · 3.31 KB
/
build.xml
File metadata and controls
111 lines (94 loc) · 3.31 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
<?xml version="1.0" encoding="UTF8"?>
<project name="cyclonephp" phingVersion="2.4.3" default="test" basedir=".">
<property file="./build.properties"/>
<target name="test" description="running phpunit tests">
<includepath classpath="${includepath}"/>
<exec command="phpunit --bootstrap=tools/unittest/bootstrap.php tools/unittest/tests.php"
checkreturn="true" dir="${project.basedir}" logoutput = "true"/>
</target>
<target name="coverage">
<includepath classpath="${includepath}"/>
<delete dir="phpunit-report/coverage"/>
<mkdir dir="phpunit-report/coverage"/>
<exec command="phpunit --bootstrap=tools/unittest/bootstrap.php --coverage-html phpunit-report/coverage --log-junit testresult.xml tools/unittest/tests.php"
checkreturn="true" dir="${project.basedir}" logoutput = "true"/>
<phpunitreport infile="testresult.xml" todir="phpunit-report"/>
<delete file="testresult.xml"/>
</target>
<target name="check_dir">
<php function="is_dir" returnProperty="is_dir">
<param value="${dir}"/>
</php>
<if>
<equals arg1="" arg2="${is_dir}"/>
<then>
<fail message="${dir} is not a directory"/>
</then>
</if>
</target>
<target name="check_writable">
<php function="is_writable" returnProperty="is_wri">
<param value="${dir}"/>
</php>
<if>
<equals arg1="" arg2="${is_wri}"/>
<then>
<fail message="directory ${dir} is not writable"/>
</then>
</if>
</target>
<target name="checkenv">
<foreach list="${apppath},${modpath},${toolpath},${assetpath}" param="dir" target="check_dir"/>
<foreach list="${logpath},${cachepath},${assetpath}" param="dir" target="check_writable"/>
<php function="function_exists" returnProperty="spl_enabled">
<param value="spl_autoload_register"/>
</php>
<if>
<equals arg1="" arg2="${spl_enabled}"/>
<then>
<fail message="SPL not found"/>
</then>
</if>
<php function="class_exists" returnProperty="reflection_enabled">
<param value="Reflection"/>
</php>
<if>
<equals arg1="" arg2="${spl_enabled}"/>
<then>
<fail message="Reflection is not enabled"/>
</then>
</if>
</target>
<target name="phplint">
<phplint level="info" haltonfailure="true">
<fileset dir="${project.basedir}">
<include name="**/classes/**/*.php"/>
</fileset>
</phplint>
</target>
<target name="jslint">
<fileset dir="${project.basedir}">
<include name="**/*.js"/>
</fileset>
</target>
<target name="lint" depends="phplint,jslint"/>
<!--
<target name="docs">
<phpdoc title="CyclonePHP documentation" destdir="docs" output="HTML:frames:earthli">
<fileset dir="${modpath}">
<include name="*/"/>
<exclude name="*/tests/**"/>
</fileset>
</phpdoc>
<copy file=".docs.stylesheet.css" tofile="docs/media/stylesheet.css" overwrite="true"/>
</target>
<target name="docs-internal">
<phpdoc title="CyclonePHP documentation" destdir="docs" output="HTML:frames:earthli" parseprivate="true" sourcecode="true">
<fileset dir="${modpath}">
<include name="*/"/>
<exclude name="*/tests/**"/>
</fileset>
</phpdoc>
<copy file=".docs.stylesheet.css" tofile="docs/media/stylesheet.css" overwrite="true"/>
</target> -->
</project>