1
- <?xml version =" 1.0" ?>
2
- <!-- ======================================================================
3
-
4
- Project: PHPCheckStyle
5
-
6
- Ant Build script for PHPCheckstyle - A Static Analysis tool for PHP.
7
-
8
-
9
- Available targets: (Run with Ant -f build.xml)
10
- ``````````````````
11
- package : Packages PHPcheckstyle in a zip file for release.
12
- phpcheckstyle : Run PHPcheckstyle.
13
-
14
- ====================================================================== -->
15
-
16
- <project name =" PHPCheckstyle" default =" phpcheckstyle" basedir =" ." >
17
-
18
- <description >
19
- Static Analysis tool for PHP.
20
- </description >
21
-
22
- <!-- =================================
23
- target: init
24
- Initializes variables.
25
- ================================= -->
26
- <target name =" _init" >
27
- <property name =" build.dir" value =" build" />
28
- <property name =" tmp.dir" value =" ${ build.dir } /tmp" />
29
- <property name =" dist.dir" value =" ${ build.dir } /dist" />
30
-
31
- <property name =" phpcheckstyle.version.major" value =" 0" />
32
- <property name =" phpcheckstyle.version.minor" value =" 13.1" />
33
- <property name =" phpcheckstyle.version" value =" ${ phpcheckstyle.version.major } .${ phpcheckstyle.version.minor } " />
34
-
35
- <property name =" phpcheckstyle.name" value =" PHPCheckStyle-${ phpcheckstyle.version } .zip" />
36
-
37
- </target >
38
-
39
- <!-- =================================
40
- target: clean
41
- Deletes the output folder.
42
- ================================= -->
43
- <target name =" _clean" depends =" _init" >
44
- <delete dir =" ${ build.dir } " />
45
- </target >
46
-
47
- <!-- =================================
48
- target: prepare
49
- creates a new build folder.
50
- ================================= -->
51
- <target name =" _prepare" depends =" _clean" >
52
- <mkdir dir =" ${ build.dir } " />
53
- <mkdir dir =" ${ dist.dir } " />
54
- <mkdir dir =" ${ tmp.dir } " />
55
- </target >
56
-
57
- <!-- Copy the files -->
58
- <target name =" _copy" description =" Copy the files in a temp directory" depends =" _prepare" >
59
-
60
- <copy todir =" ${ tmp.dir } " >
61
- <fileset dir =" ${ basedir } " >
62
- <exclude name =" /build/" />
63
- <exclude name =" /checkstyle_result/" />
64
- <exclude name =" .models" />
65
- <exclude name =" .project" />
66
- <exclude name =" checkstyle_resultncss.xml" />
67
- </fileset >
68
-
69
-
70
- <!-- Override the version number -->
71
- <filterchain >
72
- <tokenfilter >
73
- <replaceregex pattern =" @version (.*)" replace =" @version ${ phpcheckstyle.version } " />
74
- </tokenfilter >
75
- </filterchain >
76
-
77
- </copy >
78
-
79
- </target >
80
-
81
-
82
- <!-- =================================
83
- target: package
84
- Packages PHPcheckstyle in a zip file for release.
85
- @author : Justin
86
- ================================= -->
87
- <target name =" package" depends =" _copy" description =" Packages PHPcheckstyle in a zip file for release" >
88
- <zip destfile =" ${ dist.dir } /${ phpcheckstyle.name } " basedir =" ${ tmp.dir } " />
89
- </target >
90
-
91
- <!-- Test the environment -->
92
- <target name =" targetCheck" >
93
- <condition property =" isUnix" >
94
- <and >
95
- <os family =" unix" />
96
- </and >
97
- </condition >
98
- <condition property =" isWindows" >
99
- <and >
100
- <os family =" windows" />
101
- </and >
102
- </condition >
103
- </target >
104
-
105
- <!-- Launch PHP CheckStyle -->
106
- <target name =" _phpcheckstylewindows" depends =" targetCheck" if =" isWindows" >
107
- <echo >Windows</echo >
108
- <exec executable =" ./phpcheckstyle.cmd" dir =" ." >
109
- </exec >
110
- </target >
111
-
112
- <!-- Launch PHP CheckStyle -->
113
- <target name =" _phpcheckstyleunix" depends =" targetCheck" if =" isUnix" >
114
- <echo >Unix</echo >
115
- <chmod file =" ./phpcheckstyle.sh" perm =" ugo+rx" />
116
- <exec executable =" ./phpcheckstyle.sh" dir =" ." >
117
- </exec >
118
- </target >
119
-
120
- <!-- Launch PHP CheckStyle-->
121
- <target name =" phpcheckstyle" description =" Launch PHP CheckStyle" depends =" _phpcheckstylewindows, _phpcheckstyleunix" >
122
- </target >
123
-
124
- </project >
1
+ <?xml version =" 1.0" ?>
2
+ <!-- ======================================================================
3
+
4
+ Project: PHPCheckStyle
5
+
6
+ Ant Build script for PHPCheckstyle - A Static Analysis tool for PHP.
7
+
8
+
9
+ Available targets: (Run with Ant -f build.xml)
10
+ ``````````````````
11
+ package : Packages PHPcheckstyle in a zip file for release.
12
+ phpcheckstyle : Run PHPcheckstyle.
13
+
14
+ ====================================================================== -->
15
+
16
+ <project name =" PHPCheckstyle" default =" phpcheckstyle" basedir =" ." >
17
+
18
+ <description >
19
+ Static Analysis tool for PHP.
20
+ </description >
21
+
22
+ <!-- =================================
23
+ target: init
24
+ Initializes variables.
25
+ ================================= -->
26
+ <target name =" _init" >
27
+ <property name =" build.dir" value =" build" />
28
+ <property name =" tmp.dir" value =" ${ build.dir } /tmp" />
29
+ <property name =" dist.dir" value =" ${ build.dir } /dist" />
30
+
31
+ <property name =" phpcheckstyle.version.major" value =" 0" />
32
+ <property name =" phpcheckstyle.version.minor" value =" 13.1" />
33
+ <property name =" phpcheckstyle.version" value =" ${ phpcheckstyle.version.major } .${ phpcheckstyle.version.minor } " />
34
+
35
+ <property name =" phpcheckstyle.name" value =" PHPCheckStyle-${ phpcheckstyle.version } .zip" />
36
+
37
+ </target >
38
+
39
+ <!-- =================================
40
+ target: clean
41
+ Deletes the output folder.
42
+ ================================= -->
43
+ <target name =" _clean" depends =" _init" >
44
+ <delete dir =" ${ build.dir } " />
45
+ </target >
46
+
47
+ <!-- =================================
48
+ target: prepare
49
+ creates a new build folder.
50
+ ================================= -->
51
+ <target name =" _prepare" depends =" _clean" >
52
+ <mkdir dir =" ${ build.dir } " />
53
+ <mkdir dir =" ${ dist.dir } " />
54
+ <mkdir dir =" ${ tmp.dir } " />
55
+ </target >
56
+
57
+ <!-- Copy the files -->
58
+ <target name =" _copy" description =" Copy the files in a temp directory" depends =" _prepare" >
59
+
60
+ <copy todir =" ${ tmp.dir } " >
61
+ <fileset dir =" ${ basedir } " >
62
+ <exclude name =" /build/" />
63
+ <exclude name =" /checkstyle_result/" />
64
+ <exclude name =" .models" />
65
+ <exclude name =" .project" />
66
+ <exclude name =" checkstyle_resultncss.xml" />
67
+ </fileset >
68
+
69
+
70
+ <!-- Override the version number -->
71
+ <filterchain >
72
+ <tokenfilter >
73
+ <replaceregex pattern =" @version (.*)" replace =" @version ${ phpcheckstyle.version } " />
74
+ </tokenfilter >
75
+ </filterchain >
76
+
77
+ </copy >
78
+
79
+ </target >
80
+
81
+
82
+ <!-- =================================
83
+ target: package
84
+ Packages PHPcheckstyle in a zip file for release.
85
+ @author : Justin
86
+ ================================= -->
87
+ <target name =" package" depends =" _copy" description =" Packages PHPcheckstyle in a zip file for release" >
88
+ <zip destfile =" ${ dist.dir } /${ phpcheckstyle.name } " basedir =" ${ tmp.dir } " />
89
+ </target >
90
+
91
+ <!-- Test the environment -->
92
+ <target name =" targetCheck" >
93
+ <condition property =" isUnix" >
94
+ <and >
95
+ <os family =" unix" />
96
+ </and >
97
+ </condition >
98
+ <condition property =" isWindows" >
99
+ <and >
100
+ <os family =" windows" />
101
+ </and >
102
+ </condition >
103
+ </target >
104
+
105
+ <!-- Launch PHP CheckStyle -->
106
+ <target name =" _phpcheckstylewindows" depends =" targetCheck" if =" isWindows" >
107
+ <echo >Windows</echo >
108
+ <exec executable =" ./phpcheckstyle.cmd" dir =" ." >
109
+ </exec >
110
+ </target >
111
+
112
+ <!-- Launch PHP CheckStyle -->
113
+ <target name =" _phpcheckstyleunix" depends =" targetCheck" if =" isUnix" >
114
+ <echo >Unix</echo >
115
+ <chmod file =" ./phpcheckstyle.sh" perm =" ugo+rx" />
116
+ <exec executable =" ./phpcheckstyle.sh" dir =" ." >
117
+ </exec >
118
+ </target >
119
+
120
+ <!-- Launch PHP CheckStyle-->
121
+ <target name =" phpcheckstyle" description =" Launch PHP CheckStyle" depends =" _phpcheckstylewindows, _phpcheckstyleunix" >
122
+ </target >
123
+
124
+ </project >
0 commit comments