-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
254 lines (218 loc) · 10.4 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
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<?xml version="1.0" encoding="UTF-8"?>
<project name="Build All" default="build-all" basedir="..">
<property file="${basedir}/ant/.properties" />
<condition property="isLinux">
<os family="unix" />
</condition>
<condition property="isWin">
<os family="windows" />
</condition>
<target name="linux" if="isLinux">
<echo message="OS is Linux" />
<property name="FLEX_HOME" value="${FLEX_HOME_LINUX}"/>
<property name="ASDOC_HOME" value="${FLEX_HOME}/bin/asdoc.exe"/>
<property name="GIT_HOME" value="${GIT_HOME_LINUX}"/>
<property name="GIT_CONFIG" value="${git.config.linux}"/>
<property name="prop.file" value="${basedir}/ant/.properties"/>
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
</target>
<target name="win" if="isWin">
<echo message="OS is Windows" />
<property name="FLEX_HOME" value="${FLEX_HOME_PC}"/>
<property name="ASDOC_HOME" value="${FLEX_HOME}/bin/asdoc.exe"/>
<property name="GIT_HOME" value="${GIT_HOME_PC}"/>
<property name="GIT_CONFIG" value="${git.config.pc}"/>
<property name="prop.file" value="${basedir}/ant/.properties"/>
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
</target>
<target name="clean">
<delete>
<fileset dir="${basedir}/swc/">
<include name="wezside.toolkit.*"/>
</fileset>
</delete>
<delete>
<fileset dir="${basedir}/../Toolkit-Components/swc/">
<include name="wezside.toolkit.*" />
</fileset>
</delete>
</target>
<target name="toolkit">
<propertyfile file="${prop.file}" comment="Update build version">
<entry key="build.int" type="int" default="0001" operation="+" pattern="0000" />
</propertyfile>
<!-- Update README version number -->
<subant buildpath="." genericantfile="${basedir}/ant/util/replace-version/build.xml">
<property name="version" value="${version}"/>
<property name="build.int" value="${build.int}"/>
<property name="target.file" value="${basedir}/README.md" />
</subant>
<!-- Compile Toolkit SWC -->
<echo message="Compile Toolkit SWC ${version}${build.int}" />
<subant buildpath="." genericantfile="${basedir}/ant/flex/build.xml">
<property name="FLEX_HOME" value="${FLEX_HOME}"/>
<property name="swc.file" value="${basedir}/swc/wezside.toolkit.${version}${build.int}.swc"/>
</subant>
<!-- Commit Toolkit to remote Git Repo -->
<echo message="Git Operations for Toolkit ${version}${build.int}" />
<subant buildpath="." genericantfile="${basedir}/ant/git/build.xml">
<property name="GIT_HOME" value="${GIT_HOME}" />
<property name="GIT_CONFIG" value="${GIT_CONFIG}" />
<property name="git.author" value="${git.author}" />
<property name="project.name" value="Toolkit" />
<property name="version" value="${version}" />
<property name="build.int" value="${build.int}" />
<property name="branch" value="master" />
<property name="remote.repo" value="origin" />
</subant>
<!-- Commit Toolkit Ant to remote Git Repo -->
<echo message="Git Operations for Toolkit ${version}${build.int}" />
<subant buildpath="./ant/" genericantfile="${basedir}/ant/git/build.xml">
<property name="GIT_HOME" value="${GIT_HOME}"/>
<property name="GIT_CONFIG" value="${GIT_CONFIG}"/>
<property name="git.author" value="${git.author}"/>
<property name="project.name" value="Wezside-Ant"/>
<property name="version" value="${version}"/>
<property name="build.int" value="${build.int}"/>
<property name="branch" value="master"/>
<property name="remote.repo" value="origin"/>
</subant>
</target>
<!-- COMPILE TOOLKIT_COMPONENTS SWC -->
<target name="toolkit-components" if="toolkit-comps-available">
<delete>
<fileset dir="${basedir}/../Toolkit-Components/lib/">
<include name="wezside.toolkit.*"/>
</fileset>
</delete>
<echo message="Copy Toolkit SWC ${version}${build.int} to Toolkit-Component" />
<copy todir="${basedir}/../Toolkit-Components/lib/" verbose="false">
<fileset dir="swc" defaultexcludes="true">
<include name="wezside.toolkit.*" />
</fileset>
</copy>
<copy todir="${basedir}/../Toolkit-Wiki/swc/" verbose="false">
<fileset dir="swc" defaultexcludes="true">
<include name="wezside.toolkit.*" />
</fileset>
</copy>
<echo message="Compile Toolkit-Components SWC ${version}${build.int}" />
<subant buildpath="${basedir}/../Toolkit-Components" genericantfile="${basedir}/ant/flex/build.xml">
<property name="FLEX_HOME" value="${FLEX_HOME}"/>
<property name="swc.file" value="${basedir}/../Toolkit-Components/swc/wezside.toolkit.comps.${version}${build.int}.swc"/>
</subant>
<!-- Commit to remote Git Repo -->
<echo message="Git Operations for Toolkit-Components ${version}${build.int}" />
<subant buildpath="${basedir}/../Toolkit-Components" genericantfile="${basedir}/ant/git/build.xml">
<property name="GIT_HOME" value="${GIT_HOME}"/>
<property name="GIT_CONFIG" value="${GIT_CONFIG}"/>
<property name="git.author" value="${git.author}"/>
<property name="project.name" value="Toolkit-Components"/>
<property name="version" value="${version}"/>
<property name="build.int" value="${build.int}"/>
<property name="branch" value="master"/>
<property name="remote.repo" value="origin"/>
</subant>
</target>
<!-- BUILD MODULO -->
<target name="modulo" if="modulo-available">
<propertyfile file="${prop.file}" comment="Update build version">
<entry key="modulo.build.int" type="int" default="0001" operation="+" pattern="0000" />
</propertyfile>
<delete>
<fileset dir="${basedir}/../Modulo/lib/">
<include name="wezside.toolkit.*"/>
</fileset>
<fileset dir="${basedir}/../Modulo/swc/">
<include name="modulo.*"/>
</fileset>
</delete>
<echo message="Copy Toolkit SWCs ${version}${build.int} to Modulo" />
<copy todir="${basedir}/../Modulo/lib/" verbose="false">
<fileset dir="swc" defaultexcludes="true">
<include name="wezside.toolkit.*" />
</fileset>
<fileset dir="${basedir}/../Toolkit-Components/swc" defaultexcludes="true">
<include name="wezside.toolkit.*" />
</fileset>
</copy>
<echo message="Compile Toolkit-Components SWC ${version}${build.int}" />
<subant buildpath="${basedir}/../Modulo" genericantfile="${basedir}/ant/flex/build.xml">
<property name="FLEX_HOME" value="${FLEX_HOME}"/>
<property name="swc.file" value="${basedir}/../Modulo/swc/modulo.${modulo.version}${modulo.build.int}.swc"/>
</subant>
<!-- Commit to remote Git Repo -->
<echo message="Git Operations for Modulo ${version}${build.int}" />
<subant buildpath="${basedir}/../Toolkit-Components" genericantfile="${basedir}/ant/git/build.xml">
<property name="GIT_HOME" value="${GIT_HOME}"/>
<property name="GIT_CONFIG" value="${GIT_CONFIG}"/>
<property name="git.author" value="${git.author}"/>
<property name="project.name" value="Modulo"/>
<property name="version" value="${modulo.version}"/>
<property name="build.int" value="${modulo.build.int}"/>
<property name="branch" value="master"/>
<property name="remote.repo" value="origin"/>
</subant>
</target>
<target name="build-asdocs" depends="win,linux" description="Build ASDOC and update Wiki version">
<delete>
<fileset dir="${basedir}/../Toolkit-gh-pages/docs">
<include name="**/toolkit/**" />
<include name="**/comps/***" />
</fileset>
</delete>
<echo message="Generating ASDocs for Toolkit" />
<subant buildpath="." genericantfile="${basedir}/ant/util/replace-version/build.xml">
<property name="version" value="${version}"/>
<property name="build.int" value="${build.int}"/>
<property name="target.file" value="${basedir}/../Toolkit-Wiki/Latest-Release.md" />
</subant>
<subant buildpath="." genericantfile="${basedir}/ant/asdoc/build.xml">
<property name="FLEX_HOME" value="${FLEX_HOME}"/>
<property name="ASDOC_HOME" value="${ASDOC_HOME}"/>
<property name="output.dir" value="${basedir}/../Toolkit-gh-pages/docs/toolkit"/>
<property name="lenient" value="false"/>
<property name="page.title" value="Wezside Toolkit"/>
<property name="exclude.dependancies" value="false"/>
<property name="src.path" value="${basedir}/src/"/>
<property name="class.path" value="${basedir}/src/"/>
</subant>
<echo message="Generating ASDocs for Toolkit Components" />
<subant buildpath="${basedir}/../Toolkit-Components" genericantfile="${basedir}/ant/asdoc/build.xml">
<property name="FLEX_HOME" value="${FLEX_HOME}"/>
<property name="ASDOC_HOME" value="${ASDOC_HOME}"/>
<property name="output.dir" value="${basedir}/../Toolkit-gh-pages/docs/comps"/>
<property name="lenient" value="false"/>
<property name="page.title" value="Wezside Toolkit Components"/>
<property name="exclude.dependancies" value="true"/>
<property name="src.path" value="${basedir}/../Toolkit-Components/src/"/>
<property name="class.path" value="${basedir}/../Toolkit-Components/src/"/>
</subant>
<!-- Commit to remote Git Repo -->
<echo message="Git Operations for Toolkit API Docs ${version}${build.int}" />
<subant buildpath="${basedir}/../Toolkit-gh-pages" genericantfile="${basedir}/ant/git/build.xml">
<property name="GIT_HOME" value="${GIT_HOME}"/>
<property name="GIT_CONFIG" value="${GIT_CONFIG}"/>
<property name="git.author" value="${git.author}"/>
<property name="project.name" value="Toolkit API Docs"/>
<property name="version" value="${version}"/>
<property name="build.int" value="${build.int}"/>
<property name="branch" value="gh-pages"/>
<property name="remote.repo" value="origin"/>
</subant>
</target>
<target name="build-all" depends="win,linux">
<available file="${basedir}/../Toolkit-Components/README.md" property="toolkit-comps-available" />
<echo message="Project Toolkit-Components is available: ${toolkit-comps-available}" />
<available file="${basedir}/../Modulo/README.md" property="modulo-available" />
<echo message="Project Modulo is available: ${modulo-available}" />
<available file="${basedir}/../Toolkit-Wiki/About.md" property="wiki-available" />
<echo message="Toolkit Wiki is available: ${wiki-available}" />
<available file="${basedir}/../Toolkit-gh-pages/index.html" property="pages-available" />
<echo message="Toolkit GH-Pages is available: ${pages-available}" />
<antcall target="clean" />
<antcall target="toolkit" />
<antcall target="toolkit-components" />
<antcall target="build-asdocs" />
</target>
</project>