commit | author | age
|
5fe7df
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
85c2e6
|
2 |
<project name="gitblit" default="compile" basedir=".">
|
JM |
3 |
|
|
4 |
<!-- Google Code upload task -->
|
9cf48d
|
5 |
<taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask"
|
JM |
6 |
classpath="${basedir}/tools/ant-googlecode-0.0.3.jar" name="gcupload"/>
|
5fe7df
|
7 |
|
f6740d
|
8 |
<!-- GenJar task -->
|
JM |
9 |
<taskdef resource="genjar.properties" classpath="${basedir}/tools/GenJar.jar" />
|
|
10 |
|
5fe7df
|
11 |
<!-- Project Properties -->
|
JM |
12 |
<property name="project.jar" value="gitblit.jar" />
|
dd7961
|
13 |
<property name="project.mainclass" value="com.gitblit.Launcher" />
|
5fe7df
|
14 |
<property name="project.build.dir" value="${basedir}/build" />
|
85c2e6
|
15 |
<property name="project.deploy.dir" value="${basedir}/deploy" />
|
JM |
16 |
<property name="project.war.dir" value="${basedir}/war" />
|
|
17 |
<property name="project.site.dir" value="${basedir}/site" />
|
|
18 |
<property name="project.resources.dir" value="${basedir}/resources" />
|
ff3015
|
19 |
<available property="hasBuildProps" file="${basedir}/build.properties"/>
|
5fe7df
|
20 |
|
ff3015
|
21 |
<!--
|
JM |
22 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
23 |
Load build.properties, if available
|
|
24 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
25 |
-->
|
|
26 |
<target name="buildprops" if="hasBuildProps">
|
|
27 |
<!-- Load publication servers, paths, and credentials -->
|
|
28 |
<loadproperties>
|
|
29 |
<file file="${basedir}/build.properties" />
|
|
30 |
</loadproperties>
|
|
31 |
</target>
|
5450d0
|
32 |
|
85c2e6
|
33 |
|
JM |
34 |
<!--
|
|
35 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
36 |
Scrape the version info from code and setup the build properties
|
|
37 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
38 |
-->
|
ff3015
|
39 |
<target name="buildinfo" depends="buildprops">
|
5450d0
|
40 |
|
f13c4c
|
41 |
<!-- extract Gitblit version number from source code -->
|
f98825
|
42 |
<loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
|
JM |
43 |
<filterchain>
|
|
44 |
<linecontains>
|
2a7306
|
45 |
<contains value="public static final String VERSION = " />
|
dd7961
|
46 |
</linecontains>
|
JM |
47 |
<striplinebreaks />
|
|
48 |
<tokenfilter>
|
2a7306
|
49 |
<replacestring from="public static final String VERSION = "" to="" />
|
a4d249
|
50 |
<replacestring from="";" to="" />
|
JM |
51 |
<trim />
|
|
52 |
</tokenfilter>
|
1f9dae
|
53 |
</filterchain>
|
a4d249
|
54 |
</loadfile>
|
d39680
|
55 |
|
JM |
56 |
<!-- extract Gitblit version date from source code -->
|
|
57 |
<loadfile property="gb.versionDate" srcfile="${basedir}/src/com/gitblit/Constants.java">
|
|
58 |
<filterchain>
|
|
59 |
<linecontains>
|
|
60 |
<contains value="public static final String VERSION_DATE = " />
|
|
61 |
</linecontains>
|
|
62 |
<striplinebreaks />
|
|
63 |
<tokenfilter>
|
|
64 |
<replacestring from="public static final String VERSION_DATE = "" to="" />
|
|
65 |
<replacestring from="";" to="" />
|
|
66 |
<trim />
|
|
67 |
</tokenfilter>
|
|
68 |
</filterchain>
|
|
69 |
</loadfile>
|
|
70 |
|
a4d249
|
71 |
<!-- extract JGit version number from source code -->
|
JM |
72 |
<loadfile property="jgit.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
|
|
73 |
<filterchain>
|
|
74 |
<linecontains>
|
2a7306
|
75 |
<contains value="public static final String JGIT_VERSION = " />
|
a4d249
|
76 |
</linecontains>
|
JM |
77 |
<striplinebreaks />
|
|
78 |
<tokenfilter>
|
2a7306
|
79 |
<replacestring from="public static final String JGIT_VERSION = "" to="" />
|
dd7961
|
80 |
<replacestring from="";" to="" />
|
f98825
|
81 |
<trim />
|
JM |
82 |
</tokenfilter>
|
|
83 |
</filterchain>
|
85c2e6
|
84 |
</loadfile>
|
5450d0
|
85 |
<property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />
|
JM |
86 |
<property name="distribution.warfile" value="gitblit-${gb.version}.war" />
|
f6740d
|
87 |
<property name="fedclient.zipfile" value="fedclient-${gb.version}.zip" />
|
5450d0
|
88 |
</target>
|
JM |
89 |
|
85c2e6
|
90 |
|
JM |
91 |
<!--
|
|
92 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
93 |
Compile
|
|
94 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
95 |
-->
|
|
96 |
<target name="compile" depends="buildinfo" description="Retrieves dependencies and compiles Gitblit from source">
|
dd7961
|
97 |
|
f98825
|
98 |
<!-- copy required distribution files to project folder -->
|
JM |
99 |
<copy todir="${basedir}" overwrite="false">
|
|
100 |
<fileset dir="${basedir}/distrib">
|
|
101 |
<include name="gitblit.properties" />
|
|
102 |
<include name="users.properties" />
|
|
103 |
</fileset>
|
|
104 |
</copy>
|
dd7961
|
105 |
|
5fe7df
|
106 |
<!-- Compile the build tool and execute it.
|
JM |
107 |
This downloads missing compile-time dependencies from Maven. -->
|
|
108 |
|
|
109 |
<delete dir="${project.build.dir}" />
|
|
110 |
<mkdir dir="${project.build.dir}" />
|
f6740d
|
111 |
<javac debug="true" srcdir="${basedir}/src" destdir="${project.build.dir}">
|
22fc5e
|
112 |
<include name="com/gitblit/build/Build.java" />
|
155bf7
|
113 |
<include name="com/gitblit/Constants.java" />
|
5450d0
|
114 |
<include name="com/gitblit/utils/StringUtils.java" />
|
5fe7df
|
115 |
</javac>
|
22fc5e
|
116 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.Build" />
|
5fe7df
|
117 |
|
JM |
118 |
<!-- Compile Project -->
|
|
119 |
<path id="master-classpath">
|
|
120 |
<fileset dir="${basedir}/ext">
|
|
121 |
<include name="*.jar" />
|
|
122 |
</fileset>
|
f6740d
|
123 |
<pathelement path="${project.build.dir}" />
|
5fe7df
|
124 |
</path>
|
f6740d
|
125 |
<javac debug="true" destdir="${project.build.dir}" failonerror="false">
|
5fe7df
|
126 |
<src path="${basedir}/src" />
|
JM |
127 |
<classpath refid="master-classpath" />
|
|
128 |
</javac>
|
|
129 |
<copy todir="${project.build.dir}">
|
|
130 |
<fileset dir="${basedir}/src" excludes="**/*.java,**/thumbs.db" />
|
|
131 |
</copy>
|
85c2e6
|
132 |
</target>
|
JM |
133 |
|
|
134 |
|
|
135 |
<!--
|
|
136 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
137 |
Build Gitblit GO
|
|
138 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
139 |
-->
|
|
140 |
<target name="buildGO" depends="compile" description="Build Gitblit GO distribution">
|
|
141 |
|
|
142 |
<echo>Building Gitblit GO ${gb.version}</echo>
|
|
143 |
|
|
144 |
<!-- Delete the deploy folder -->
|
|
145 |
<delete dir="${project.deploy.dir}" />
|
|
146 |
|
|
147 |
<!-- Create deployment folder structure -->
|
|
148 |
<mkdir dir="${project.deploy.dir}" />
|
|
149 |
<copy todir="${project.deploy.dir}">
|
|
150 |
<fileset dir="${basedir}/distrib">
|
|
151 |
<include name="**/*" />
|
f6740d
|
152 |
<exclude name="federation.properties" />
|
85c2e6
|
153 |
</fileset>
|
7c643b
|
154 |
<fileset dir="${basedir}">
|
JM |
155 |
<include name="LICENSE" />
|
|
156 |
<include name="NOTICE" />
|
|
157 |
</fileset>
|
85c2e6
|
158 |
</copy>
|
5fe7df
|
159 |
|
JM |
160 |
<!-- Build jar -->
|
85c2e6
|
161 |
<jar jarfile="${project.deploy.dir}/${project.jar}">
|
5fe7df
|
162 |
<fileset dir="${project.build.dir}">
|
JM |
163 |
<include name="**/*" />
|
|
164 |
</fileset>
|
5450d0
|
165 |
<fileset dir="${project.resources.dir}">
|
JM |
166 |
<exclude name="thumbs.db" />
|
|
167 |
</fileset>
|
5fe7df
|
168 |
<manifest>
|
JM |
169 |
<attribute name="Main-Class" value="${project.mainclass}" />
|
|
170 |
</manifest>
|
|
171 |
</jar>
|
|
172 |
|
85c2e6
|
173 |
<!-- Build the docs for the deploy -->
|
JM |
174 |
<antcall target="buildDocs" inheritall="true" inheritrefs="true">
|
|
175 |
<param name="docs.output.dir" value="${project.deploy.dir}/docs" />
|
|
176 |
</antcall>
|
|
177 |
|
|
178 |
<!-- Create Zip deployment -->
|
|
179 |
<zip destfile="${distribution.zipfile}">
|
|
180 |
<fileset dir="${project.deploy.dir}">
|
|
181 |
<include name="**/*" />
|
|
182 |
</fileset>
|
|
183 |
</zip>
|
|
184 |
|
|
185 |
</target>
|
|
186 |
|
|
187 |
|
|
188 |
<!--
|
|
189 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
190 |
Build Gitblit Docs which are bundled with GO and WAR downloads
|
|
191 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
192 |
-->
|
|
193 |
<target name="buildDocs">
|
|
194 |
<!-- Build Docs -->
|
|
195 |
<mkdir dir="${docs.output.dir}" />
|
|
196 |
<copy todir="${docs.output.dir}">
|
|
197 |
<!-- Copy selected Gitblit resources -->
|
|
198 |
<fileset dir="${project.resources.dir}">
|
|
199 |
<include name="background.png" />
|
|
200 |
<include name="gitblit.css" />
|
|
201 |
<include name="markdown.css" />
|
|
202 |
<include name="gitblt_25.png" />
|
|
203 |
<include name="gitblt-favicon.png" />
|
|
204 |
<include name="lock_go_16x16.png" />
|
|
205 |
<include name="lock_pull_16x16.png" />
|
|
206 |
<include name="shield_16x16.png" />
|
|
207 |
<include name="cold_16x16.png" />
|
|
208 |
<include name="bug_16x16.png" />
|
|
209 |
<include name="book_16x16.png" />
|
|
210 |
<include name="blank.png" />
|
831469
|
211 |
<include name="federated_16x16.png" />
|
85c2e6
|
212 |
</fileset>
|
JM |
213 |
|
|
214 |
<!-- Copy Doc images -->
|
|
215 |
<fileset dir="${basedir}/docs">
|
|
216 |
<include name="*.png" />
|
|
217 |
</fileset>
|
|
218 |
</copy>
|
|
219 |
|
|
220 |
<!-- Copy google-code-prettify -->
|
|
221 |
<mkdir dir="${docs.output.dir}/prettify" />
|
|
222 |
<copy todir="${docs.output.dir}/prettify">
|
|
223 |
<fileset dir="${basedir}/src/com/gitblit/wicket/pages/prettify">
|
|
224 |
<exclude name="thumbs.db" />
|
|
225 |
</fileset>
|
|
226 |
</copy>
|
|
227 |
|
|
228 |
<!-- Build deployment doc pages -->
|
22fc5e
|
229 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildSite">
|
85c2e6
|
230 |
<classpath refid="master-classpath" />
|
JM |
231 |
<arg value="--sourceFolder" />
|
|
232 |
<arg value="${basedir}/docs" />
|
|
233 |
|
|
234 |
<arg value="--outputFolder" />
|
|
235 |
<arg value="${docs.output.dir}" />
|
|
236 |
|
|
237 |
<arg value="--pageHeader" />
|
|
238 |
<arg value="${basedir}/docs/doc_header.html" />
|
|
239 |
|
|
240 |
<arg value="--pageFooter" />
|
|
241 |
<arg value="${basedir}/docs/doc_footer.html" />
|
|
242 |
|
|
243 |
<arg value="--skip" />
|
|
244 |
<arg value="screenshots" />
|
|
245 |
|
|
246 |
<arg value="--skip" />
|
|
247 |
<arg value="releases" />
|
|
248 |
|
|
249 |
<arg value="--alias" />
|
|
250 |
<arg value="index=overview" />
|
|
251 |
|
|
252 |
<arg value="--alias" />
|
|
253 |
<arg value="properties=gitblit.properties" />
|
|
254 |
|
|
255 |
<arg value="--substitute" />
|
|
256 |
<arg value="%VERSION%=${gb.version}" />
|
|
257 |
|
|
258 |
<arg value="--substitute" />
|
|
259 |
<arg value="%GO%=${distribution.zipfile}" />
|
|
260 |
|
|
261 |
<arg value="--substitute" />
|
|
262 |
<arg value="%WAR%=${distribution.warfile}" />
|
|
263 |
|
|
264 |
<arg value="--substitute" />
|
f6740d
|
265 |
<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
|
JM |
266 |
|
|
267 |
<arg value="--substitute" />
|
d39680
|
268 |
<arg value="%BUILDDATE%=${gb.versionDate}" />
|
85c2e6
|
269 |
|
JM |
270 |
<arg value="--substitute" />
|
|
271 |
<arg value="%JGIT%=${jgit.version}" />
|
|
272 |
|
230632
|
273 |
<arg value="--properties" />
|
85c2e6
|
274 |
<arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
|
JM |
275 |
|
230632
|
276 |
<arg value="--nomarkdown" />
|
JM |
277 |
<arg value="%BEGINCODE%:%ENDCODE%" />
|
|
278 |
|
|
279 |
<arg value="--substitute" />
|
|
280 |
<arg value=""%BEGINCODE%=<pre class='prettyprint lang-java'>"" />
|
|
281 |
|
|
282 |
<arg value="--substitute" />
|
|
283 |
<arg value="%ENDCODE%=</pre>" />
|
5c563c
|
284 |
|
JM |
285 |
<arg value="--regex" />
|
|
286 |
<arg value=""\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>"" />
|
|
287 |
|
85c2e6
|
288 |
</java>
|
JM |
289 |
</target>
|
|
290 |
|
|
291 |
|
|
292 |
<!--
|
|
293 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
294 |
Build Gitblit WAR
|
|
295 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
296 |
-->
|
|
297 |
<target name="buildWAR" depends="compile" description="Build Gitblit WAR">
|
|
298 |
|
|
299 |
<echo>Building Gitblit WAR ${gb.version}</echo>
|
|
300 |
|
|
301 |
<delete dir="${project.war.dir}" />
|
|
302 |
|
|
303 |
<!-- Copy web.xml and users.properties to WEB-INF -->
|
|
304 |
<copy todir="${project.war.dir}/WEB-INF">
|
|
305 |
<fileset dir="${basedir}/distrib">
|
|
306 |
<include name="users.properties" />
|
|
307 |
</fileset>
|
|
308 |
<fileset dir="${basedir}/src/WEB-INF">
|
|
309 |
<include name="web.xml" />
|
|
310 |
</fileset>
|
7c643b
|
311 |
<fileset dir="${basedir}">
|
JM |
312 |
<include name="LICENSE" />
|
|
313 |
<include name="NOTICE" />
|
|
314 |
</fileset>
|
85c2e6
|
315 |
</copy>
|
JM |
316 |
|
|
317 |
<!-- Build the docs for the WAR build -->
|
|
318 |
<antcall target="buildDocs" inheritall="true" inheritrefs="true">
|
|
319 |
<param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" />
|
|
320 |
</antcall>
|
|
321 |
|
|
322 |
<!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties -->
|
22fc5e
|
323 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml">
|
85c2e6
|
324 |
<classpath refid="master-classpath" />
|
JM |
325 |
|
|
326 |
<arg value="--sourceFile" />
|
|
327 |
<arg value="${basedir}/src/WEB-INF/web.xml" />
|
|
328 |
|
|
329 |
<arg value="--destinationFile" />
|
|
330 |
<arg value="${project.war.dir}/WEB-INF/web.xml" />
|
|
331 |
|
|
332 |
<arg value="--propertiesFile" />
|
|
333 |
<arg value="${basedir}/distrib/gitblit.properties" />
|
|
334 |
</java>
|
|
335 |
|
|
336 |
<!-- Gitblit resources -->
|
|
337 |
<copy todir="${project.war.dir}">
|
|
338 |
<fileset dir="${project.resources.dir}">
|
|
339 |
<exclude name="thumbs.db" />
|
|
340 |
</fileset>
|
|
341 |
</copy>
|
|
342 |
|
|
343 |
<!-- Gitblit library dependencies -->
|
|
344 |
<mkdir dir="${project.war.dir}/WEB-INF/lib"/>
|
|
345 |
<copy todir="${project.war.dir}/WEB-INF/lib">
|
|
346 |
<fileset dir="${basedir}/ext">
|
|
347 |
<exclude name="*-sources.jar" />
|
|
348 |
<exclude name="*-javadoc.jar" />
|
|
349 |
<exclude name="jcommander*.jar" />
|
|
350 |
<exclude name="jetty*.jar" />
|
|
351 |
<exclude name="junit*.jar" />
|
|
352 |
<exclude name="servlet*.jar" />
|
|
353 |
</fileset>
|
|
354 |
</copy>
|
|
355 |
|
|
356 |
<!-- Gitblit classes -->
|
|
357 |
<mkdir dir="${project.war.dir}/WEB-INF/classes"/>
|
|
358 |
<copy todir="${project.war.dir}/WEB-INF/classes">
|
|
359 |
<fileset dir="${project.build.dir}">
|
|
360 |
<exclude name="WEB-INF/web.xml" />
|
|
361 |
<exclude name="com/gitblit/tests/" />
|
22fc5e
|
362 |
<exclude name="com/gitblit/build/**" />
|
85c2e6
|
363 |
<exclude name="com/gitblit/GitBlitServer*.class" />
|
JM |
364 |
<exclude name="com/gitblit/Launcher*.class" />
|
|
365 |
<exclude name="com/gitblit/MakeCertificate*.class" />
|
|
366 |
</fileset>
|
|
367 |
</copy>
|
|
368 |
|
|
369 |
<!-- Build the WAR file -->
|
|
370 |
<jar basedir="${project.war.dir}" destfile="${distribution.warfile}" compress="true" />
|
|
371 |
</target>
|
|
372 |
|
|
373 |
|
f6740d
|
374 |
<!--
|
JM |
375 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
376 |
Build the stand-alone, command-line Gitblit Federation Client
|
|
377 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
378 |
-->
|
|
379 |
<target name="buildFederationClient" depends="compile" description="Builds the stand-alone Gitblit federation client">
|
|
380 |
<echo>Building Gitblit Federation Client ${gb.version}</echo>
|
|
381 |
|
|
382 |
<genjar jarfile="fedclient.jar">
|
|
383 |
<class name="com.gitblit.FederationClientLauncher" />
|
|
384 |
<resource file="${project.build.dir}/log4j.properties" />
|
|
385 |
<classfilter>
|
|
386 |
<exclude name="org.apache." />
|
|
387 |
<exclude name="org.bouncycastle." />
|
|
388 |
<exclude name="org.eclipse." />
|
|
389 |
<exclude name="org.slf4j." />
|
|
390 |
<exclude name="com.beust." />
|
|
391 |
<exclude name="com.google." />
|
|
392 |
</classfilter>
|
|
393 |
<classpath refid="master-classpath" />
|
|
394 |
<manifest>
|
|
395 |
<attribute name="Main-Class" value="com.gitblit.FederationClientLauncher" />
|
|
396 |
<attribute name="Specification-Version" value="${gb.version}" />
|
|
397 |
<attribute name="Release-Date" value="${gb.versionDate}" />
|
|
398 |
</manifest>
|
|
399 |
</genjar>
|
|
400 |
|
|
401 |
<!-- Build the federation client zip file -->
|
|
402 |
<zip destfile="${fedclient.zipfile}">
|
|
403 |
<fileset dir="${basedir}">
|
|
404 |
<include name="fedclient.jar" />
|
|
405 |
</fileset>
|
|
406 |
<fileset dir="${basedir}/distrib">
|
|
407 |
<include name="federation.properties" />
|
|
408 |
</fileset>
|
|
409 |
</zip>
|
|
410 |
</target>
|
|
411 |
|
|
412 |
|
85c2e6
|
413 |
<!--
|
JM |
414 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
415 |
Build the Gitblit Website
|
|
416 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
417 |
-->
|
|
418 |
<target name="buildSite" depends="compile" description="Build the Gitblit website">
|
|
419 |
|
|
420 |
<echo>Building Gitblit Website ${gb.version}</echo>
|
|
421 |
|
dd7961
|
422 |
<!-- Build Site -->
|
85c2e6
|
423 |
<delete dir="${project.site.dir}" />
|
JM |
424 |
<mkdir dir="${project.site.dir}" />
|
|
425 |
<copy todir="${project.site.dir}">
|
f13c4c
|
426 |
<!-- Copy selected Gitblit resources -->
|
5450d0
|
427 |
<fileset dir="${project.resources.dir}">
|
dd7961
|
428 |
<include name="background.png" />
|
JM |
429 |
<include name="gitblit.css" />
|
|
430 |
<include name="markdown.css" />
|
|
431 |
<include name="gitblt_25.png" />
|
|
432 |
<include name="gitblt-favicon.png" />
|
f90dc6
|
433 |
<include name="lock_go_16x16.png" />
|
JM |
434 |
<include name="lock_pull_16x16.png" />
|
|
435 |
<include name="shield_16x16.png" />
|
|
436 |
<include name="cold_16x16.png" />
|
|
437 |
<include name="bug_16x16.png" />
|
|
438 |
<include name="book_16x16.png" />
|
|
439 |
<include name="blank.png" />
|
831469
|
440 |
<include name="federated_16x16.png" />
|
dd7961
|
441 |
</fileset>
|
a4d249
|
442 |
|
f90dc6
|
443 |
<!-- Copy Doc images -->
|
dd7961
|
444 |
<fileset dir="${basedir}/docs">
|
f90dc6
|
445 |
<include name="*.png" />
|
JM |
446 |
<include name="*.js" />
|
|
447 |
</fileset>
|
|
448 |
</copy>
|
a4d249
|
449 |
|
f90dc6
|
450 |
<!-- Copy Fancybox -->
|
85c2e6
|
451 |
<mkdir dir="${project.site.dir}/fancybox" />
|
JM |
452 |
<copy todir="${project.site.dir}/fancybox">
|
a4d249
|
453 |
<fileset dir="${basedir}/docs/fancybox">
|
f90dc6
|
454 |
<exclude name="thumbs.db" />
|
JM |
455 |
</fileset>
|
|
456 |
</copy>
|
a4d249
|
457 |
|
230632
|
458 |
<!-- Copy google-code-prettify -->
|
JM |
459 |
<mkdir dir="${basedir}/src/com/gitblit/wicket/pages/prettify" />
|
|
460 |
<copy todir="${project.site.dir}/prettify">
|
|
461 |
<fileset dir="${basedir}/src/com/gitblit/wicket/pages/prettify">
|
|
462 |
<exclude name="thumbs.db" />
|
|
463 |
</fileset>
|
|
464 |
</copy>
|
|
465 |
|
24d08f
|
466 |
<!-- Generate thumbnails of screenshots -->
|
22fc5e
|
467 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildThumbnails">
|
24d08f
|
468 |
<classpath refid="master-classpath" />
|
JM |
469 |
|
|
470 |
<arg value="--sourceFolder" />
|
|
471 |
<arg value="${basedir}/docs/screenshots" />
|
|
472 |
|
|
473 |
<arg value="--destinationFolder" />
|
85c2e6
|
474 |
<arg value="${project.site.dir}/thumbs" />
|
24d08f
|
475 |
|
JM |
476 |
<arg value="--maximumDimension" />
|
|
477 |
<arg value="250" />
|
|
478 |
</java>
|
a4d249
|
479 |
|
f90dc6
|
480 |
<!-- Copy screenshots -->
|
85c2e6
|
481 |
<mkdir dir="${project.site.dir}/screenshots" />
|
JM |
482 |
<copy todir="${project.site.dir}/screenshots">
|
f90dc6
|
483 |
<fileset dir="${basedir}/docs/screenshots">
|
JM |
484 |
<include name="*.png" />
|
|
485 |
</fileset>
|
|
486 |
</copy>
|
|
487 |
|
a4d249
|
488 |
<!-- Build site pages -->
|
22fc5e
|
489 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildSite">
|
dd7961
|
490 |
<classpath refid="master-classpath" />
|
JM |
491 |
<arg value="--sourceFolder" />
|
|
492 |
<arg value="${basedir}/docs" />
|
a4d249
|
493 |
|
dd7961
|
494 |
<arg value="--outputFolder" />
|
85c2e6
|
495 |
<arg value="${project.site.dir}" />
|
dd7961
|
496 |
|
JM |
497 |
<arg value="--pageHeader" />
|
81f881
|
498 |
<arg value="${basedir}/docs/site_header.html" />
|
e7a153
|
499 |
|
dd7961
|
500 |
<arg value="--pageFooter" />
|
81f881
|
501 |
<arg value="${basedir}/docs/site_footer.html" />
|
a4d249
|
502 |
|
e7a153
|
503 |
<arg value="--analyticsSnippet" />
|
JM |
504 |
<arg value="${basedir}/docs/site_analytics.html" />
|
|
505 |
|
|
506 |
<arg value="--adSnippet" />
|
|
507 |
<arg value="${basedir}/docs/site_ads.html" />
|
|
508 |
|
e0054b
|
509 |
<arg value="--alias" />
|
JM |
510 |
<arg value="index=overview" />
|
424fe1
|
511 |
|
1f9dae
|
512 |
<arg value="--alias" />
|
JM |
513 |
<arg value="properties=gitblit.properties" />
|
a4d249
|
514 |
|
JM |
515 |
<arg value="--substitute" />
|
|
516 |
<arg value="%VERSION%=${gb.version}" />
|
|
517 |
|
|
518 |
<arg value="--substitute" />
|
85c2e6
|
519 |
<arg value="%GO%=${distribution.zipfile}" />
|
JM |
520 |
|
|
521 |
<arg value="--substitute" />
|
|
522 |
<arg value="%WAR%=${distribution.warfile}" />
|
a4d249
|
523 |
|
JM |
524 |
<arg value="--substitute" />
|
f6740d
|
525 |
<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
|
JM |
526 |
|
|
527 |
<arg value="--substitute" />
|
d39680
|
528 |
<arg value="%BUILDDATE%=${gb.versionDate}" />
|
a4d249
|
529 |
|
JM |
530 |
<arg value="--substitute" />
|
|
531 |
<arg value="%JGIT%=${jgit.version}" />
|
1f9dae
|
532 |
|
a3f474
|
533 |
<arg value="--properties" />
|
1f9dae
|
534 |
<arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
|
230632
|
535 |
|
JM |
536 |
<arg value="--nomarkdown" />
|
|
537 |
<arg value="%BEGINCODE%:%ENDCODE%" />
|
|
538 |
|
|
539 |
<arg value="--substitute" />
|
|
540 |
<arg value=""%BEGINCODE%=<pre class='prettyprint lang-java'>"" />
|
|
541 |
|
|
542 |
<arg value="--substitute" />
|
|
543 |
<arg value="%ENDCODE%=</pre>" />
|
1f9dae
|
544 |
|
5c563c
|
545 |
<arg value="--regex" />
|
JM |
546 |
<arg value=""\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>"" />
|
|
547 |
|
a3f474
|
548 |
</java>
|
85c2e6
|
549 |
</target>
|
81f881
|
550 |
|
424fe1
|
551 |
|
85c2e6
|
552 |
<!--
|
JM |
553 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
554 |
Compile from source, publish binaries, and build & deploy site
|
|
555 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
556 |
-->
|
f6740d
|
557 |
<target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildSite">
|
1f9dae
|
558 |
<!-- Cleanup -->
|
2a7306
|
559 |
<delete dir="${project.build.dir}" />
|
85c2e6
|
560 |
<delete dir="${project.war.dir}" />
|
JM |
561 |
<delete dir="${project.deploy.dir}" />
|
5fe7df
|
562 |
</target>
|
85c2e6
|
563 |
|
81f881
|
564 |
|
85c2e6
|
565 |
<!--
|
JM |
566 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
567 |
Publish binaries to Google Code
|
|
568 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
569 |
-->
|
cd4b2b
|
570 |
<target name="publishBinaries" depends="buildGO,buildWAR,buildFederationClient" description="Publish the Gitblit binaries to Google Code">
|
85c2e6
|
571 |
|
JM |
572 |
<echo>Uploading Gitblit ${gb.version} binaries</echo>
|
|
573 |
|
|
574 |
<!-- Upload ZIP file -->
|
|
575 |
<gcupload
|
|
576 |
username="${googlecode.user}"
|
|
577 |
password="${googlecode.password}"
|
|
578 |
projectname="gitblit"
|
|
579 |
filename="${distribution.zipfile}"
|
|
580 |
targetfilename="gitblit-${gb.version}.zip"
|
ed21d2
|
581 |
summary="Gitblit GO v${gb.version} (standalone, integrated Gitblit server)"
|
85c2e6
|
582 |
labels="Featured, Type-Package, OpSys-All" />
|
5450d0
|
583 |
|
85c2e6
|
584 |
<!-- Upload WAR file -->
|
JM |
585 |
<gcupload
|
|
586 |
username="${googlecode.user}"
|
|
587 |
password="${googlecode.password}"
|
|
588 |
projectname="gitblit"
|
|
589 |
filename="${distribution.warfile}"
|
|
590 |
targetfilename="gitblit-${gb.version}.war"
|
ed21d2
|
591 |
summary="Gitblit WAR v${gb.version} (standard WAR webapp for servlet containers)"
|
85c2e6
|
592 |
labels="Featured, Type-Package, OpSys-All" />
|
f6740d
|
593 |
|
JM |
594 |
<!-- Upload FedClient -->
|
|
595 |
<gcupload
|
|
596 |
username="${googlecode.user}"
|
|
597 |
password="${googlecode.password}"
|
|
598 |
projectname="gitblit"
|
|
599 |
filename="${fedclient.zipfile}"
|
|
600 |
targetfilename="fedclient-${gb.version}.zip"
|
|
601 |
summary="Gitblit Federation Client v${gb.version} (command-line tool to clone data from federated Gitblit instances)"
|
|
602 |
labels="Featured, Type-Package, OpSys-All" />
|
5450d0
|
603 |
</target>
|
JM |
604 |
|
|
605 |
|
85c2e6
|
606 |
<!--
|
JM |
607 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
608 |
Publish site to hosting service
|
|
609 |
You must add ext/commons-net-1.4.0.jar to your ANT classpath.
|
|
610 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
611 |
-->
|
|
612 |
<target name="publishSite" depends="buildSite" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
|
|
613 |
|
|
614 |
<echo>Uploading Gitblit ${gb.version} website</echo>
|
|
615 |
|
81f881
|
616 |
<ftp server="${ftp.server}"
|
JM |
617 |
userid="${ftp.user}"
|
|
618 |
password="${ftp.password}"
|
|
619 |
remotedir="${ftp.dir}"
|
|
620 |
passive="true"
|
|
621 |
verbose="yes">
|
85c2e6
|
622 |
<fileset dir="${project.site.dir}" />
|
81f881
|
623 |
</ftp>
|
JM |
624 |
</target>
|
85c2e6
|
625 |
|
81f881
|
626 |
|
85c2e6
|
627 |
<!--
|
JM |
628 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
629 |
Compile from source, publish binaries, and build & deploy site
|
|
630 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
631 |
-->
|
|
632 |
<target name="publishAll" depends="publishBinaries,publishSite">
|
|
633 |
<!-- Cleanup -->
|
|
634 |
<delete dir="${project.build.dir}" />
|
|
635 |
<delete dir="${project.war.dir}" />
|
|
636 |
<delete dir="${project.deploy.dir}" />
|
|
637 |
</target>
|
5450d0
|
638 |
</project> |