-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·197 lines (166 loc) · 8.13 KB
/
Copy pathbuild.xml
File metadata and controls
executable file
·197 lines (166 loc) · 8.13 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?xml version="1.0"?>
<project name="addressBook" default="Doc" basedir=".">
<!-- ========================================================= -->
<!-- GLOBAL ENVIRONMENT -->
<!-- ========================================================= -->
<!-- ================= Common to all projects ================ -->
<!-- 1.- Project Paths -->
<property name="path" value="."/>
<property name="source" value="${path}/src"/>
<property name="logs" value="${path}/logs"/>
<property name="test" value="${path}/test"/>
<property name="doc" value="${path}/doc"/>
<property name="phar" value="${path}/phar"/>
<!-- 2.- Project Properties -->
<property name="name" value="addressbook"/>
<!-- 3.- PHP Documentor 2 Properties -->
<property name="template" value="responsive-twig"/>
<property name="title" value="Address Book Documentation"/>
<property name="searchPattern" value="**/*.php"/>
<!-- 4.- PHAR Properties -->
<property name="package" value="${phar}/${name}.phar"/>
<property name="compression" value="gzip"/>
<property name="version" value="1.0"/>
<property name="author" value="Cesar Delgado"/>
<property name="email" value="contact@cesar-delgado.info"/>
<property name="stub" value="stub.php"/>
<!-- =============== Specific to this project =============== -->
<!-- =============== Not Used, sytax reminder =============== -->
<available file="${jsDocLocalExec}.cmd" property="jsDoc.windows"/>
<available file="${jsDocExec}" property="jsDoc.unix"/>
<!-- Launching options: -p <port> -f <logFile> -t <logType> -l <logLevel> -v -h -->
<property name="logFile" value="" />
<property name="logType" value="" />
<property name="logLevel" value="-l trace" />
<property name="verbose" value="-v" />
<property name="port" value="-p 4001" />
<property name="help" value="" />
<!-- ======================================================== -->
<!-- COMMON SECTION : SAME FOR ALL PROJECTS -->
<!-- ======================================================== -->
<!-- ================== TimeStamp =================== -->
<target name="init">
<echo>.....INIT: timestamping" </echo>
<tstamp/>
</target>
<!-- ================== OS Detection ================= -->
<target name="CheckOS" depends="init">
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isUnix">
<os family="unix" />
</condition>
</target>
<!-- ================== Cleaning Environment =================== -->
<target name="CleanLogs" depends="init" description="Cleaning log files">
<echo>+ ============================================= </echo>
<echo>+ CLEANING LOGS: ... [${logs}]" </echo>
<echo>+ ============================================= </echo>
<delete dir="${logs}" />
<mkdir dir="${logs}" />
<chmod file="${logs}" mode="0777" verbose="true" />
</target>
<target name="CleanPhar" depends="init" description="Cleaning log files">
<echo>+ ============================================= </echo>
<echo>+ CLEANING PHAR: ... [${phar}]" </echo>
<echo>+ ============================================= </echo>
<delete dir="${phar}" />
<mkdir dir="${phar}" />
</target>
<!-- ================== Packing Project =================== -->
<target name="Phar" depends="CleanPhar">
<echo>+ ============================================= </echo>
<echo>+ PHAR PACKING PROJECT .......... [${name}] </echo>
<echo>+ ->Destination File............. [${package}] </echo>
<echo>+ ->Compression.................. [${compression}]</echo>
<echo>+ ->Basedir: Source Code......... [${source}] </echo>
<echo>+ ->Search Pattern............... [${searchPattern}] </echo>
<echo>+ ->Stub: Compliance Test File... stub.php </echo>
<echo>+ ->Version...................... [${version}] </echo>
<echo>+ ->Author....................... [${author}] </echo>
<echo>+ ->eMail........................ [${email}] </echo>
<echo>+ ============================================= </echo>
<pharpackage
compression="${compression}"
destfile="${package}"
stub="stub.php"
basedir="${path}">
<fileset dir="${source}">
<include name="${searchPattern}" />
</fileset>
<metadata>
<element name="version" value="${version}" />
<element name="authors">
<element name="${author}">
<element name="email" value="${email}" />
</element>
</element>
</metadata>
</pharpackage>
</target>
<!-- ======================================================== -->
<!-- SPECIFIC SECTION : DIFFERENT FROM PROJECT TO PROJECT -->
<!-- ======================================================== -->
<!-- ================ Install Windows Dependencies =============== -->
<target name="winInstallDependencies" depends="CheckOS" if="isWindows" description="Install Dependencies in Windows">
<echo>+ ============================================= </echo>
<echo>+ INSTALL Dependencies in Windows... " </echo>
<echo>+ ->Executable: Composer... ${composerExec}" </echo>
<echo>+ ->Options: .............. ${composerOptions}" </echo>
<echo>+ ============================================= </echo>
</target>
<!-- ================ Install Unix Dependencies =============== -->
<target name="unixInstallDependencies" depends="CheckOS" if="isUnix" description="Install Dependencies in Unix">
<echo>+ ============================================= </echo>
<echo>+ INSTALL Dependencies in Unix... ${basedir}" </echo>
<echo>+ ->Executable: Composer... ${composerExec}" </echo>
<echo>+ ->Options: .............. ${composerOptions}" </echo>
<echo>+ ============================================= </echo>
</target>
<!-- ================ Install Dependencies =============== -->
<target name="installDependencies" description="Install Dependencies, in Windows or Unix"
depends="unixInstallDependencies, winInstallDependencies">
</target>
<!-- =================== Launching Project ================== -->
<target name="Launch" depends="init" description="Launching Node.js video chat">
<echo>+ ============================================= </echo>
<echo>+ LAUNCHING Server........ ${launchScript}" </echo>
<echo>+ ->Executable: Node....... ${nodeExec}" </echo>
<echo>+ ->Options: .............. ${nodeOptions}" </echo>
<echo>+ ->Param: Listening Port.. "${port}" </echo>
<echo>+ ->Param: Logging File.... "${logFile}" </echo>
<echo>+ ->Param: Logging Type.... "${logType}" </echo>
<echo>+ ->Param: Logging Level... "${logLevel}" </echo>
<echo>+ ->Param: Verbose Mode.... "${verbose}" </echo>
<echo>+ ->Param: Help............ "${help}" </echo>
<echo>+ ============================================= </echo>
</target>
<!-- ================ Cleaning Server Documentation ============== -->
<target name="CleanDoc" depends="init"
description="Cleaning Documentation ...">
<echo>+ ============================================= </echo>
<echo>+ CLEANING PHPDocumentor... [${doc}] </echo>
<echo>+ ============================================= </echo>
<delete dir="${doc}"/>
<mkdir dir="${doc}"/>
</target>
<!-- ================ Documentation =============== -->
<target name="Doc" depends="CleanDoc"
description="Generating AddressBook Documentation">
<echo>+ ============================================= </echo>
<echo>+ GENERATING DOCUMENTATION ... </echo>
<echo>+ Description: </echo>
<echo>+ ->InputFolder Folder..[${source}] </echo>
<echo>+ ->Output Folder.......[${doc}] </echo>
<echo>+ ============================================= </echo>
<phpdoc2
destdir="${doc}"
template="${template}"
title="${title}">
<fileset dir="${source}">
<include name="${searchPattern}" />
</fileset>
</phpdoc2>
</target>
</project>