My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Piwam" default="build" basedir=".">

<property name="SRC_CSS_DIR" value="web/css" description="CSS source folder" />
<property name="DST_CSS_DIR" value="web/css" description="Output folder for CSS files" />
<property name="YUI" value="build/yuicompressor-2.4.2.jar" description="YUICompressor" />
<property name="OUTPUT_CSS_FILE" value="${DST_CSS_DIR}/style.css" />
<property name="OUTPUT_CSS_MIN" value="${DST_CSS_DIR}/style.min.css" />

<target name="init" description="Create build folder and subfolders if required">
<mkdir dir="build"/>
<mkdir dir="build/doc"/>
<mkdir dir="build/logs"/>
<mkdir dir="build/phpcb"/>
</target>

<target name="clearcache" description="Clear symfony cache">
<exec executable="${basedir}/symfony">
<arg line=" cc" />
</exec>
</target>

<target name="doc" description="Generate documentation with Doxygen">
<exec executable="doxygen">
<arg line=" doc/Doxyfile" />
</exec>
</target>

<target name="up" description="Update to the last revision">
<exec executable="svn" dir="${basedir}">
<arg line="up" />
</exec>
</target>

<target name="phpcpd" description="Search duplicate code">
<exec dir="${basedir}" executable="phpcpd" failonerror="false">
<arg line="--log-pmd ${basedir}/build/logs/pmd-cpd.xml
--exclude ${basedir}/lib/vendor
--exclude ${basedir}/cache
--exclude ${basedir}/log
--exclude ${basedir}/plugins
${basedir}" />
</exec>
</target>

<target name="pdepend" description="Create dependance report">
<exec dir="${basedir}" executable="pdepend" failonerror="false">
<arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
--ignore=${basedir}/lib/vendor
${basedir}" />
</exec>
</target>

<target name="lint" description="Check PHP syntax">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir=".">
<include name="**/*.php" />
<exclude name="lib/vendor/**/*.php" />
</fileset>
</apply>
</target>

<target name="phpcs" description="Track code violations">
<exec executable="phpcs" output="${basedir}/build/logs/checkstyle.xml" dir="${basedir}">
<arg line=" --report=checkstyle
--ignore=${basedir}/lib/vendor,${basedir}/test,${basedir}/cache,${basedir}/log,${basedir}/data,${basedir}/doc,${basedir}/web
--standard=Symfony
${basedir}" />
</exec>
</target>

<target name="test" description="Launch all the test suites">
<exec executable="${basedir}/symfony">
<arg line=" test:all
--xml=${basedir}/build/logs/tests.xml" />
</exec>
</target>

<target name="css" description="Concatenate CSS source files">
<echo message="Building ${OUTPUT_CSS_FILE}" />
<concat destfile="${OUTPUT_CSS_FILE}">
<fileset dir="${SRC_CSS_DIR}" includes="*.css" />
</concat>
<echo message="${OUTPUT_CSS_FILE} built." />
</target>

<target name="css.min" depends="css" description="Minimize CSS files">
<echo message="Building ${OUTPUT_CSS_MIN}" />
<apply executable="java" parallel="false" verbose="true" dest="${DST_CSS_DIR}">
<fileset dir="${DST_CSS_DIR}">
<include name="style.css" />
</fileset>
<arg line="-jar" />
<arg path="${YUI}" />
<arg value="--charset" />
<arg value="ANSI" />
<arg value="-o" />
<targetfile />
<mapper type="glob" from="style.css" to="style.min.css" />
</apply>
<echo message="${OUTPUT_CSS_MIN} built." />
</target>

<target name="phpcb" description="Generate Code Browser">
<exec executable="phpcb" dir="${basedir}">
<arg line="--log build/logs/
--source ${basedir}
--output build/phpcb/" />
</exec>
</target>

<target name="clean" description="Delete generated CSS files">
<delete file="${DST_CSS_DIR}/style.css" />
<delete file="${DST_CSS_DIR}/style.min.css" />
</target>

<target name="build" depends="init,clearcache,up,phpcs,phpcpd,pdepend,test" />
</project>

Change log

r1116 by adrien.mogenet on Feb 27, 2010   Diff
[1.2] Fixed command line of phpcb in
build.xml
Go to: 
Project members, sign in to write a code review

Older revisions

r1115 by adrien.mogenet on Feb 27, 2010   Diff
[1.2] New rulephpcb in build.xml
r1053 by adrien.mogenet on Feb 18, 2010   Diff
[1.2] Fixed error in command line for
phpcpd rule in antfile
r1052 by adrien.mogenet on Feb 18, 2010   Diff
[1.2] Ignored lib/vendor folder for
pdepend rule in antfile
All revisions of this file

File info

Size: 4126 bytes, 119 lines
Powered by Google Project Hosting