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" />
|
b774de
|
19 |
<property name="project.express.dir" value="${basedir}/express" />
|
ff3015
|
20 |
<available property="hasBuildProps" file="${basedir}/build.properties"/>
|
5fe7df
|
21 |
|
ff3015
|
22 |
<!--
|
JM |
23 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
24 |
Load build.properties, if available
|
|
25 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
26 |
-->
|
|
27 |
<target name="buildprops" if="hasBuildProps">
|
|
28 |
<!-- Load publication servers, paths, and credentials -->
|
|
29 |
<loadproperties>
|
|
30 |
<file file="${basedir}/build.properties" />
|
|
31 |
</loadproperties>
|
|
32 |
</target>
|
5450d0
|
33 |
|
85c2e6
|
34 |
|
JM |
35 |
<!--
|
|
36 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
37 |
Scrape the version info from code and setup the build properties
|
|
38 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
39 |
-->
|
ff3015
|
40 |
<target name="buildinfo" depends="buildprops">
|
5450d0
|
41 |
|
f13c4c
|
42 |
<!-- extract Gitblit version number from source code -->
|
f98825
|
43 |
<loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
|
JM |
44 |
<filterchain>
|
|
45 |
<linecontains>
|
2a7306
|
46 |
<contains value="public static final String VERSION = " />
|
dd7961
|
47 |
</linecontains>
|
JM |
48 |
<striplinebreaks />
|
|
49 |
<tokenfilter>
|
2a7306
|
50 |
<replacestring from="public static final String VERSION = "" to="" />
|
a4d249
|
51 |
<replacestring from="";" to="" />
|
JM |
52 |
<trim />
|
|
53 |
</tokenfilter>
|
1f9dae
|
54 |
</filterchain>
|
a4d249
|
55 |
</loadfile>
|
d39680
|
56 |
|
JM |
57 |
<!-- extract Gitblit version date from source code -->
|
|
58 |
<loadfile property="gb.versionDate" srcfile="${basedir}/src/com/gitblit/Constants.java">
|
|
59 |
<filterchain>
|
|
60 |
<linecontains>
|
|
61 |
<contains value="public static final String VERSION_DATE = " />
|
|
62 |
</linecontains>
|
|
63 |
<striplinebreaks />
|
|
64 |
<tokenfilter>
|
|
65 |
<replacestring from="public static final String VERSION_DATE = "" to="" />
|
|
66 |
<replacestring from="";" to="" />
|
|
67 |
<trim />
|
|
68 |
</tokenfilter>
|
|
69 |
</filterchain>
|
|
70 |
</loadfile>
|
|
71 |
|
a4d249
|
72 |
<!-- extract JGit version number from source code -->
|
JM |
73 |
<loadfile property="jgit.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
|
|
74 |
<filterchain>
|
|
75 |
<linecontains>
|
2a7306
|
76 |
<contains value="public static final String JGIT_VERSION = " />
|
a4d249
|
77 |
</linecontains>
|
JM |
78 |
<striplinebreaks />
|
|
79 |
<tokenfilter>
|
2a7306
|
80 |
<replacestring from="public static final String JGIT_VERSION = "" to="" />
|
dd7961
|
81 |
<replacestring from="";" to="" />
|
f98825
|
82 |
<trim />
|
JM |
83 |
</tokenfilter>
|
|
84 |
</filterchain>
|
85c2e6
|
85 |
</loadfile>
|
5450d0
|
86 |
<property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />
|
JM |
87 |
<property name="distribution.warfile" value="gitblit-${gb.version}.war" />
|
f6740d
|
88 |
<property name="fedclient.zipfile" value="fedclient-${gb.version}.zip" />
|
d65f71
|
89 |
<property name="manager.zipfile" value="manager-${gb.version}.zip" />
|
773bb6
|
90 |
<property name="gbapi.zipfile" value="gbapi-${gb.version}.zip" />
|
b774de
|
91 |
<property name="express.zipfile" value="express-${gb.version}.zip" />
|
5450d0
|
92 |
</target>
|
JM |
93 |
|
85c2e6
|
94 |
|
JM |
95 |
<!--
|
|
96 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
97 |
Compile
|
|
98 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
99 |
-->
|
|
100 |
<target name="compile" depends="buildinfo" description="Retrieves dependencies and compiles Gitblit from source">
|
dd7961
|
101 |
|
f98825
|
102 |
<!-- copy required distribution files to project folder -->
|
JM |
103 |
<copy todir="${basedir}" overwrite="false">
|
|
104 |
<fileset dir="${basedir}/distrib">
|
|
105 |
<include name="gitblit.properties" />
|
93f472
|
106 |
<include name="users.conf" />
|
f98825
|
107 |
</fileset>
|
JM |
108 |
</copy>
|
dd7961
|
109 |
|
b75734
|
110 |
<!-- copy gitblit.properties to the WEB-INF folder.
|
JM |
111 |
this file is only used for parsing setting descriptions. -->
|
97a20e
|
112 |
<copy tofile="${basedir}/src/WEB-INF/reference.properties" overwrite="true"
|
b75734
|
113 |
file="${basedir}/distrib/gitblit.properties" />
|
JM |
114 |
|
5fe7df
|
115 |
<!-- Compile the build tool and execute it.
|
JM |
116 |
This downloads missing compile-time dependencies from Maven. -->
|
|
117 |
|
|
118 |
<delete dir="${project.build.dir}" />
|
|
119 |
<mkdir dir="${project.build.dir}" />
|
f2da4a
|
120 |
<javac debug="true" srcdir="${basedir}/src" destdir="${project.build.dir}" includeantruntime="false">
|
22fc5e
|
121 |
<include name="com/gitblit/build/Build.java" />
|
155bf7
|
122 |
<include name="com/gitblit/Constants.java" />
|
5450d0
|
123 |
<include name="com/gitblit/utils/StringUtils.java" />
|
5fe7df
|
124 |
</javac>
|
d1231c
|
125 |
|
JP |
126 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.Build">
|
|
127 |
<syspropertyset id="proxy.properties">
|
|
128 |
<propertyref prefix="java.net.useSystemProxies"/>
|
|
129 |
<propertyref prefix="http."/>
|
|
130 |
<propertyref prefix="https."/>
|
|
131 |
<propertyref prefix="ftp."/>
|
|
132 |
<propertyref prefix="socksProxy"/>
|
|
133 |
</syspropertyset>
|
|
134 |
</java>
|
5fe7df
|
135 |
|
JM |
136 |
<!-- Compile Project -->
|
|
137 |
<path id="master-classpath">
|
|
138 |
<fileset dir="${basedir}/ext">
|
|
139 |
<include name="*.jar" />
|
|
140 |
</fileset>
|
f6740d
|
141 |
<pathelement path="${project.build.dir}" />
|
5fe7df
|
142 |
</path>
|
f2da4a
|
143 |
<javac debug="true" destdir="${project.build.dir}" failonerror="false" includeantruntime="false">
|
5fe7df
|
144 |
<src path="${basedir}/src" />
|
JM |
145 |
<classpath refid="master-classpath" />
|
|
146 |
</javac>
|
|
147 |
<copy todir="${project.build.dir}">
|
|
148 |
<fileset dir="${basedir}/src" excludes="**/*.java,**/thumbs.db" />
|
|
149 |
</copy>
|
85c2e6
|
150 |
</target>
|
JM |
151 |
|
|
152 |
|
|
153 |
<!--
|
|
154 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
155 |
Build Gitblit GO
|
|
156 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
157 |
-->
|
|
158 |
<target name="buildGO" depends="compile" description="Build Gitblit GO distribution">
|
|
159 |
|
|
160 |
<echo>Building Gitblit GO ${gb.version}</echo>
|
|
161 |
|
|
162 |
<!-- Delete the deploy folder -->
|
|
163 |
<delete dir="${project.deploy.dir}" />
|
|
164 |
|
|
165 |
<!-- Create deployment folder structure -->
|
|
166 |
<mkdir dir="${project.deploy.dir}" />
|
|
167 |
<copy todir="${project.deploy.dir}">
|
|
168 |
<fileset dir="${basedir}/distrib">
|
|
169 |
<include name="**/*" />
|
f6740d
|
170 |
<exclude name="federation.properties" />
|
b774de
|
171 |
<exclude name="openshift.mkd" />
|
85c2e6
|
172 |
</fileset>
|
7c643b
|
173 |
<fileset dir="${basedir}">
|
JM |
174 |
<include name="LICENSE" />
|
|
175 |
<include name="NOTICE" />
|
|
176 |
</fileset>
|
85c2e6
|
177 |
</copy>
|
5fe7df
|
178 |
|
JM |
179 |
<!-- Build jar -->
|
85c2e6
|
180 |
<jar jarfile="${project.deploy.dir}/${project.jar}">
|
5fe7df
|
181 |
<fileset dir="${project.build.dir}">
|
JM |
182 |
<include name="**/*" />
|
44f2da
|
183 |
<exclude name="com/gitblit/client/**" />
|
5fe7df
|
184 |
</fileset>
|
5450d0
|
185 |
<fileset dir="${project.resources.dir}">
|
JM |
186 |
<exclude name="thumbs.db" />
|
|
187 |
</fileset>
|
5fe7df
|
188 |
<manifest>
|
JM |
189 |
<attribute name="Main-Class" value="${project.mainclass}" />
|
|
190 |
</manifest>
|
|
191 |
</jar>
|
|
192 |
|
9be337
|
193 |
<!-- Gitblit library dependencies -->
|
836b11
|
194 |
<mkdir dir="${project.deploy.dir}/ext"/>
|
JM |
195 |
<copy todir="${project.deploy.dir}/ext">
|
9be337
|
196 |
<fileset dir="${basedir}/ext">
|
836b11
|
197 |
<exclude name="junit*.jar" />
|
926f19
|
198 |
<exclude name="hamcrest*.jar" />
|
836b11
|
199 |
<exclude name="commons-net*.jar" />
|
9be337
|
200 |
<exclude name="*-sources.jar" />
|
JM |
201 |
<exclude name="*-javadoc.jar" />
|
|
202 |
</fileset>
|
|
203 |
</copy>
|
|
204 |
|
85c2e6
|
205 |
<!-- Build the docs for the deploy -->
|
JM |
206 |
<antcall target="buildDocs" inheritall="true" inheritrefs="true">
|
|
207 |
<param name="docs.output.dir" value="${project.deploy.dir}/docs" />
|
|
208 |
</antcall>
|
|
209 |
|
59ee92
|
210 |
<!-- Copy the supported Groovy hook scripts -->
|
fa54be
|
211 |
<mkdir dir="${project.deploy.dir}/groovy" />
|
JM |
212 |
<copy todir="${project.deploy.dir}/groovy">
|
|
213 |
<fileset dir="${basedir}/groovy">
|
59ee92
|
214 |
<include name="sendmail.groovy" />
|
JM |
215 |
<include name="jenkins.groovy" />
|
58a1e4
|
216 |
<include name="protect-refs.groovy" />
|
a411c8
|
217 |
<include name="localclone.groovy" />
|
fa54be
|
218 |
</fileset>
|
JM |
219 |
</copy>
|
|
220 |
|
85c2e6
|
221 |
<!-- Create Zip deployment -->
|
JM |
222 |
<zip destfile="${distribution.zipfile}">
|
|
223 |
<fileset dir="${project.deploy.dir}">
|
|
224 |
<include name="**/*" />
|
|
225 |
</fileset>
|
|
226 |
</zip>
|
|
227 |
|
|
228 |
</target>
|
|
229 |
|
|
230 |
|
|
231 |
<!--
|
|
232 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
233 |
Build Gitblit Docs which are bundled with GO and WAR downloads
|
|
234 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
235 |
-->
|
|
236 |
<target name="buildDocs">
|
|
237 |
<!-- Build Docs -->
|
|
238 |
<mkdir dir="${docs.output.dir}" />
|
|
239 |
<copy todir="${docs.output.dir}">
|
|
240 |
<!-- Copy selected Gitblit resources -->
|
|
241 |
<fileset dir="${project.resources.dir}">
|
3cc6e2
|
242 |
<include name="bootstrap/**/*" />
|
JM |
243 |
<include name="gitblit.css" />
|
8c5d72
|
244 |
<include name="gitblt_25_white.png" />
|
85c2e6
|
245 |
<include name="gitblt-favicon.png" />
|
JM |
246 |
<include name="lock_go_16x16.png" />
|
|
247 |
<include name="lock_pull_16x16.png" />
|
|
248 |
<include name="shield_16x16.png" />
|
|
249 |
<include name="cold_16x16.png" />
|
|
250 |
<include name="bug_16x16.png" />
|
|
251 |
<include name="book_16x16.png" />
|
|
252 |
<include name="blank.png" />
|
831469
|
253 |
<include name="federated_16x16.png" />
|
0aa6ec
|
254 |
<include name="arrow_page.png" />
|
85c2e6
|
255 |
</fileset>
|
JM |
256 |
|
|
257 |
<!-- Copy Doc images -->
|
|
258 |
<fileset dir="${basedir}/docs">
|
|
259 |
<include name="*.png" />
|
f35a98
|
260 |
<include name="*.gif" />
|
85c2e6
|
261 |
</fileset>
|
JM |
262 |
</copy>
|
|
263 |
|
|
264 |
<!-- Copy google-code-prettify -->
|
|
265 |
<mkdir dir="${docs.output.dir}/prettify" />
|
|
266 |
<copy todir="${docs.output.dir}/prettify">
|
|
267 |
<fileset dir="${basedir}/src/com/gitblit/wicket/pages/prettify">
|
|
268 |
<exclude name="thumbs.db" />
|
|
269 |
</fileset>
|
|
270 |
</copy>
|
|
271 |
|
|
272 |
<!-- Build deployment doc pages -->
|
22fc5e
|
273 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildSite">
|
85c2e6
|
274 |
<classpath refid="master-classpath" />
|
JM |
275 |
<arg value="--sourceFolder" />
|
|
276 |
<arg value="${basedir}/docs" />
|
|
277 |
|
|
278 |
<arg value="--outputFolder" />
|
|
279 |
<arg value="${docs.output.dir}" />
|
|
280 |
|
|
281 |
<arg value="--pageHeader" />
|
|
282 |
<arg value="${basedir}/docs/doc_header.html" />
|
|
283 |
|
|
284 |
<arg value="--pageFooter" />
|
|
285 |
<arg value="${basedir}/docs/doc_footer.html" />
|
|
286 |
|
|
287 |
<arg value="--skip" />
|
|
288 |
<arg value="screenshots" />
|
|
289 |
|
|
290 |
<arg value="--skip" />
|
|
291 |
<arg value="releases" />
|
|
292 |
|
|
293 |
<arg value="--alias" />
|
|
294 |
<arg value="index=overview" />
|
|
295 |
|
|
296 |
<arg value="--alias" />
|
4c835e
|
297 |
<arg value="properties=settings" />
|
85c2e6
|
298 |
|
JM |
299 |
<arg value="--substitute" />
|
|
300 |
<arg value="%VERSION%=${gb.version}" />
|
|
301 |
|
|
302 |
<arg value="--substitute" />
|
|
303 |
<arg value="%GO%=${distribution.zipfile}" />
|
|
304 |
|
|
305 |
<arg value="--substitute" />
|
|
306 |
<arg value="%WAR%=${distribution.warfile}" />
|
|
307 |
|
|
308 |
<arg value="--substitute" />
|
f6740d
|
309 |
<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
|
JM |
310 |
|
|
311 |
<arg value="--substitute" />
|
d65f71
|
312 |
<arg value="%MANAGER%=${manager.zipfile}" />
|
773bb6
|
313 |
|
JM |
314 |
<arg value="--substitute" />
|
|
315 |
<arg value="%API%=${gbapi.zipfile}" />
|
841651
|
316 |
|
JM |
317 |
<arg value="--substitute" />
|
b774de
|
318 |
<arg value="%EXPRESS%=${express.zipfile}" />
|
JM |
319 |
|
|
320 |
<arg value="--substitute" />
|
d39680
|
321 |
<arg value="%BUILDDATE%=${gb.versionDate}" />
|
85c2e6
|
322 |
|
JM |
323 |
<arg value="--substitute" />
|
|
324 |
<arg value="%JGIT%=${jgit.version}" />
|
|
325 |
|
230632
|
326 |
<arg value="--properties" />
|
85c2e6
|
327 |
<arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
|
JM |
328 |
|
230632
|
329 |
<arg value="--nomarkdown" />
|
JM |
330 |
<arg value="%BEGINCODE%:%ENDCODE%" />
|
|
331 |
|
|
332 |
<arg value="--substitute" />
|
|
333 |
<arg value=""%BEGINCODE%=<pre class='prettyprint lang-java'>"" />
|
|
334 |
|
|
335 |
<arg value="--substitute" />
|
|
336 |
<arg value="%ENDCODE%=</pre>" />
|
5c563c
|
337 |
|
JM |
338 |
<arg value="--regex" />
|
|
339 |
<arg value=""\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>"" />
|
|
340 |
|
85c2e6
|
341 |
</java>
|
JM |
342 |
</target>
|
|
343 |
|
|
344 |
|
|
345 |
<!--
|
|
346 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
347 |
Build Gitblit WAR
|
|
348 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
349 |
-->
|
|
350 |
<target name="buildWAR" depends="compile" description="Build Gitblit WAR">
|
|
351 |
|
|
352 |
<echo>Building Gitblit WAR ${gb.version}</echo>
|
|
353 |
|
b774de
|
354 |
<delete dir="${project.war.dir}" />
|
85c2e6
|
355 |
|
93f472
|
356 |
<!-- Copy web.xml and users.conf to WEB-INF -->
|
85c2e6
|
357 |
<copy todir="${project.war.dir}/WEB-INF">
|
JM |
358 |
<fileset dir="${basedir}/distrib">
|
93f472
|
359 |
<include name="users.conf" />
|
85c2e6
|
360 |
</fileset>
|
JM |
361 |
<fileset dir="${basedir}/src/WEB-INF">
|
|
362 |
<include name="web.xml" />
|
|
363 |
</fileset>
|
7c643b
|
364 |
<fileset dir="${basedir}">
|
JM |
365 |
<include name="LICENSE" />
|
|
366 |
<include name="NOTICE" />
|
|
367 |
</fileset>
|
85c2e6
|
368 |
</copy>
|
JM |
369 |
|
97a20e
|
370 |
<!-- Copy gitblit.properties as reference.properties -->
|
JM |
371 |
<copy tofile="${project.war.dir}/WEB-INF/reference.properties"
|
|
372 |
file="${basedir}/distrib/gitblit.properties"/>
|
|
373 |
|
85c2e6
|
374 |
<!-- Build the docs for the WAR build -->
|
JM |
375 |
<antcall target="buildDocs" inheritall="true" inheritrefs="true">
|
|
376 |
<param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" />
|
|
377 |
</antcall>
|
fa54be
|
378 |
|
59ee92
|
379 |
<!-- Copy the supported Groovy hook scripts -->
|
fa54be
|
380 |
<mkdir dir="${project.war.dir}/WEB-INF/groovy" />
|
JM |
381 |
<copy todir="${project.war.dir}/WEB-INF/groovy">
|
|
382 |
<fileset dir="${basedir}/groovy">
|
59ee92
|
383 |
<include name="sendmail.groovy" />
|
JM |
384 |
<include name="jenkins.groovy" />
|
58a1e4
|
385 |
<include name="protect-refs.groovy" />
|
a411c8
|
386 |
<include name="localclone.groovy" />
|
fa54be
|
387 |
</fileset>
|
JM |
388 |
</copy>
|
|
389 |
|
85c2e6
|
390 |
<!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties -->
|
22fc5e
|
391 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml">
|
85c2e6
|
392 |
<classpath refid="master-classpath" />
|
JM |
393 |
|
|
394 |
<arg value="--sourceFile" />
|
|
395 |
<arg value="${basedir}/src/WEB-INF/web.xml" />
|
|
396 |
|
|
397 |
<arg value="--destinationFile" />
|
|
398 |
<arg value="${project.war.dir}/WEB-INF/web.xml" />
|
|
399 |
|
|
400 |
<arg value="--propertiesFile" />
|
|
401 |
<arg value="${basedir}/distrib/gitblit.properties" />
|
|
402 |
</java>
|
|
403 |
|
|
404 |
<!-- Gitblit resources -->
|
|
405 |
<copy todir="${project.war.dir}">
|
|
406 |
<fileset dir="${project.resources.dir}">
|
|
407 |
<exclude name="thumbs.db" />
|
|
408 |
</fileset>
|
|
409 |
</copy>
|
|
410 |
|
|
411 |
<!-- Gitblit library dependencies -->
|
|
412 |
<mkdir dir="${project.war.dir}/WEB-INF/lib"/>
|
|
413 |
<copy todir="${project.war.dir}/WEB-INF/lib">
|
|
414 |
<fileset dir="${basedir}/ext">
|
|
415 |
<exclude name="*-sources.jar" />
|
|
416 |
<exclude name="*-javadoc.jar" />
|
|
417 |
<exclude name="jcommander*.jar" />
|
|
418 |
<exclude name="jetty*.jar" />
|
|
419 |
<exclude name="junit*.jar" />
|
926f19
|
420 |
<exclude name="hamcrest*.jar" />
|
85c2e6
|
421 |
<exclude name="servlet*.jar" />
|
5e43f6
|
422 |
<exclude name="javax.servlet*.jar" />
|
85c2e6
|
423 |
</fileset>
|
JM |
424 |
</copy>
|
|
425 |
|
|
426 |
<!-- Gitblit classes -->
|
|
427 |
<mkdir dir="${project.war.dir}/WEB-INF/classes"/>
|
|
428 |
<copy todir="${project.war.dir}/WEB-INF/classes">
|
|
429 |
<fileset dir="${project.build.dir}">
|
b774de
|
430 |
<exclude name="WEB-INF/" />
|
85c2e6
|
431 |
<exclude name="com/gitblit/tests/" />
|
22fc5e
|
432 |
<exclude name="com/gitblit/build/**" />
|
44f2da
|
433 |
<exclude name="com/gitblit/client/**" />
|
126dde
|
434 |
<exclude name="com/gitblit/AddIndexedBranch*.class" />
|
85c2e6
|
435 |
<exclude name="com/gitblit/GitBlitServer*.class" />
|
JM |
436 |
<exclude name="com/gitblit/Launcher*.class" />
|
773bb6
|
437 |
<exclude name="com/gitblit/MakeCertificate*.class" />
|
85c2e6
|
438 |
</fileset>
|
JM |
439 |
</copy>
|
|
440 |
|
|
441 |
<!-- Build the WAR file -->
|
|
442 |
<jar basedir="${project.war.dir}" destfile="${distribution.warfile}" compress="true" />
|
|
443 |
</target>
|
|
444 |
|
|
445 |
|
f6740d
|
446 |
<!--
|
JM |
447 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
448 |
Build the stand-alone, command-line Gitblit Federation Client
|
|
449 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
450 |
-->
|
|
451 |
<target name="buildFederationClient" depends="compile" description="Builds the stand-alone Gitblit federation client">
|
|
452 |
<echo>Building Gitblit Federation Client ${gb.version}</echo>
|
|
453 |
|
|
454 |
<genjar jarfile="fedclient.jar">
|
|
455 |
<class name="com.gitblit.FederationClientLauncher" />
|
|
456 |
<resource file="${project.build.dir}/log4j.properties" />
|
|
457 |
<classfilter>
|
|
458 |
<exclude name="org.apache." />
|
|
459 |
<exclude name="org.bouncycastle." />
|
|
460 |
<exclude name="org.eclipse." />
|
|
461 |
<exclude name="org.slf4j." />
|
|
462 |
<exclude name="com.beust." />
|
|
463 |
<exclude name="com.google." />
|
1b437a
|
464 |
<exclude name="com.unboundid." />
|
f6740d
|
465 |
</classfilter>
|
JM |
466 |
<classpath refid="master-classpath" />
|
|
467 |
<manifest>
|
|
468 |
<attribute name="Main-Class" value="com.gitblit.FederationClientLauncher" />
|
773bb6
|
469 |
<attribute name="Specification-Version" value="${gb.version}" />
|
f6740d
|
470 |
<attribute name="Release-Date" value="${gb.versionDate}" />
|
JM |
471 |
</manifest>
|
|
472 |
</genjar>
|
|
473 |
|
|
474 |
<!-- Build the federation client zip file -->
|
|
475 |
<zip destfile="${fedclient.zipfile}">
|
|
476 |
<fileset dir="${basedir}">
|
773bb6
|
477 |
<include name="fedclient.jar" />
|
d65f71
|
478 |
<include name="LICENSE" />
|
JM |
479 |
<include name="NOTICE" />
|
f6740d
|
480 |
</fileset>
|
JM |
481 |
<fileset dir="${basedir}/distrib">
|
773bb6
|
482 |
<include name="federation.properties" />
|
f6740d
|
483 |
</fileset>
|
JM |
484 |
</zip>
|
|
485 |
</target>
|
|
486 |
|
841651
|
487 |
|
JM |
488 |
<!--
|
|
489 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
b774de
|
490 |
Build a Gitblit filesystem for deployment to RedHat OpenShif Expresst
|
JM |
491 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
492 |
-->
|
9be337
|
493 |
<target name="buildExpress" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express">
|
b774de
|
494 |
<echo>Building Gitblit Express for RedHat OpenShift ${gb.version}</echo>
|
JM |
495 |
|
|
496 |
<delete dir="${project.express.dir}" />
|
|
497 |
|
|
498 |
<!-- Create the OpenShift filesystem -->
|
|
499 |
<property name="deployments.root" value="${project.express.dir}/deployments/ROOT.war"/>
|
|
500 |
<mkdir dir="${deployments.root}" />
|
|
501 |
<touch file="${project.express.dir}/deployments/ROOT.war.dodeploy" />
|
|
502 |
|
|
503 |
<!-- Copy the Gitblit OpenShift readme file -->
|
|
504 |
<copy tofile="${project.express.dir}/README.gitblit"
|
|
505 |
file="${basedir}/distrib/openshift.mkd"/>
|
|
506 |
|
|
507 |
<!-- Copy LICENSE and NOTICE to WEB-INF -->
|
|
508 |
<copy todir="${deployments.root}/WEB-INF">
|
|
509 |
<fileset dir="${basedir}">
|
|
510 |
<include name="LICENSE" />
|
|
511 |
<include name="NOTICE" />
|
|
512 |
</fileset>
|
|
513 |
</copy>
|
|
514 |
|
|
515 |
<!-- Copy gitblit.properties as reference.properties -->
|
|
516 |
<copy tofile="${deployments.root}/WEB-INF/reference.properties"
|
|
517 |
file="${basedir}/distrib/gitblit.properties"/>
|
|
518 |
|
e36d4d
|
519 |
<!-- Copy the supported Groovy hook scripts -->
|
JM |
520 |
<mkdir dir="${deployments.root}/WEB-INF/groovy" />
|
|
521 |
<copy todir="${deployments.root}/WEB-INF/groovy">
|
|
522 |
<fileset dir="${basedir}/groovy">
|
|
523 |
<include name="sendmail.groovy" />
|
|
524 |
<include name="jenkins.groovy" />
|
58a1e4
|
525 |
<include name="protect-refs.groovy" />
|
e36d4d
|
526 |
</fileset>
|
JM |
527 |
</copy>
|
|
528 |
|
b774de
|
529 |
<!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties -->
|
JM |
530 |
<!-- THIS FILE IS NOT OVERRIDDEN ONCE IT IS BUILT!!! -->
|
|
531 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml">
|
|
532 |
<classpath refid="master-classpath" />
|
|
533 |
|
|
534 |
<arg value="--sourceFile" />
|
|
535 |
<arg value="${basedir}/src/WEB-INF/web.xml" />
|
|
536 |
|
|
537 |
<arg value="--destinationFile" />
|
|
538 |
<arg value="${deployments.root}/WEB-INF/web.xml" />
|
|
539 |
|
|
540 |
<arg value="--propertiesFile" />
|
|
541 |
<arg value="${basedir}/distrib/gitblit.properties" />
|
|
542 |
</java>
|
|
543 |
|
|
544 |
<!-- Gitblit resources -->
|
|
545 |
<copy todir="${deployments.root}">
|
|
546 |
<fileset dir="${project.resources.dir}">
|
|
547 |
<exclude name="thumbs.db" />
|
|
548 |
</fileset>
|
|
549 |
</copy>
|
|
550 |
|
|
551 |
<!-- Gitblit library dependencies -->
|
|
552 |
<mkdir dir="${deployments.root}/WEB-INF/lib"/>
|
|
553 |
<copy todir="${deployments.root}/WEB-INF/lib">
|
|
554 |
<fileset dir="${basedir}/ext">
|
|
555 |
<exclude name="*-sources.jar" />
|
|
556 |
<exclude name="*-javadoc.jar" />
|
|
557 |
<exclude name="jcommander*.jar" />
|
|
558 |
<exclude name="jetty*.jar" />
|
|
559 |
<exclude name="junit*.jar" />
|
926f19
|
560 |
<exclude name="hamcrest*.jar" />
|
b774de
|
561 |
<exclude name="servlet*.jar" />
|
5e43f6
|
562 |
<exclude name="javax.servlet*.jar" />
|
b774de
|
563 |
</fileset>
|
JM |
564 |
</copy>
|
|
565 |
|
|
566 |
<!-- Gitblit classes -->
|
764d94
|
567 |
<jar destfile="${deployments.root}/WEB-INF/lib/gitblit-${gb.version}.jar">
|
b774de
|
568 |
<fileset dir="${project.build.dir}">
|
JM |
569 |
<exclude name="WEB-INF/" />
|
|
570 |
<exclude name="com/gitblit/tests/" />
|
|
571 |
<exclude name="com/gitblit/build/**" />
|
|
572 |
<exclude name="com/gitblit/client/**" />
|
|
573 |
<exclude name="com/gitblit/GitBlitServer*.class" />
|
|
574 |
<exclude name="com/gitblit/Launcher*.class" />
|
|
575 |
<exclude name="com/gitblit/MakeCertificate*.class" />
|
|
576 |
</fileset>
|
764d94
|
577 |
</jar>
|
b774de
|
578 |
|
JM |
579 |
<!-- Build Express Zip file -->
|
|
580 |
<zip destfile="${express.zipfile}">
|
|
581 |
<fileset dir="${project.express.dir}" />
|
|
582 |
</zip>
|
|
583 |
|
|
584 |
</target>
|
|
585 |
|
|
586 |
|
|
587 |
<!--
|
|
588 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
a7a9f7
|
589 |
Build the stand-alone, Gitblit Manager
|
841651
|
590 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
591 |
-->
|
a7a9f7
|
592 |
<target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
|
JM |
593 |
<echo>Building Gitblit Manager ${gb.version}</echo>
|
b774de
|
594 |
|
712210
|
595 |
<genjar jarfile="manager-${gb.version}.jar">
|
841651
|
596 |
<resource file="${basedir}/src/com/gitblit/client/splash.png" />
|
JM |
597 |
<resource file="${basedir}/resources/gitblt-favicon.png" />
|
ee25c8
|
598 |
<resource file="${basedir}/resources/gitweb-favicon.png" />
|
0cf876
|
599 |
<resource file="${basedir}/resources/git-orange-16x16.png" />
|
ee25c8
|
600 |
<resource file="${basedir}/resources/user_16x16.png" />
|
04627e
|
601 |
<resource file="${basedir}/resources/users_16x16.png" />
|
ee25c8
|
602 |
<resource file="${basedir}/resources/settings_16x16.png" />
|
841651
|
603 |
<resource file="${basedir}/resources/lock_go_16x16.png" />
|
JM |
604 |
<resource file="${basedir}/resources/lock_pull_16x16.png" />
|
|
605 |
<resource file="${basedir}/resources/shield_16x16.png" />
|
|
606 |
<resource file="${basedir}/resources/federated_16x16.png" />
|
|
607 |
<resource file="${basedir}/resources/cold_16x16.png" />
|
|
608 |
<resource file="${basedir}/resources/book_16x16.png" />
|
|
609 |
<resource file="${basedir}/resources/bug_16x16.png" />
|
a70b43
|
610 |
<resource file="${basedir}/resources/health_16x16.png" />
|
4cac0d
|
611 |
<resource file="${basedir}/resources/feed_16x16.png" />
|
JM |
612 |
<resource file="${basedir}/resources/bullet_feed.png" />
|
9119cf
|
613 |
<resource file="${basedir}/resources/search-icon.png" />
|
ee458f
|
614 |
<resource file="${basedir}/resources/commit_changes_16x16.png" />
|
c7e7e9
|
615 |
<resource file="${basedir}/resources/commit_merge_16x16.png" />
|
841651
|
616 |
<resource file="${basedir}/resources/blank.png" />
|
b7f591
|
617 |
<resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />
|
df35ad
|
618 |
<resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_ja.properties" />
|
b774de
|
619 |
|
a7a9f7
|
620 |
<class name="com.gitblit.client.GitblitManagerLauncher" />
|
841651
|
621 |
<classfilter>
|
JM |
622 |
<exclude name="org.apache." />
|
|
623 |
<exclude name="org.bouncycastle." />
|
|
624 |
<exclude name="org.eclipse." />
|
|
625 |
<exclude name="org.slf4j." />
|
|
626 |
<exclude name="com.beust." />
|
|
627 |
<exclude name="com.google." />
|
1b437a
|
628 |
<exclude name="com.unboundid." />
|
841651
|
629 |
</classfilter>
|
JM |
630 |
<classpath refid="master-classpath" />
|
|
631 |
<manifest>
|
a7a9f7
|
632 |
<attribute name="Main-Class" value="com.gitblit.client.GitblitManagerLauncher" />
|
841651
|
633 |
<attribute name="SplashScreen-Image" value="splash.png" />
|
773bb6
|
634 |
<attribute name="Specification-Version" value="${gb.version}" />
|
841651
|
635 |
<attribute name="Release-Date" value="${gb.versionDate}" />
|
JM |
636 |
</manifest>
|
|
637 |
</genjar>
|
b774de
|
638 |
|
d65f71
|
639 |
<!-- Build Manager Zip file -->
|
JM |
640 |
<zip destfile="${manager.zipfile}">
|
|
641 |
<fileset dir="${basedir}">
|
|
642 |
<include name="manager-${gb.version}.jar" />
|
|
643 |
<include name="LICENSE" />
|
|
644 |
<include name="NOTICE" />
|
|
645 |
</fileset>
|
|
646 |
</zip>
|
841651
|
647 |
</target>
|
773bb6
|
648 |
|
JM |
649 |
<!--
|
|
650 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
651 |
Build the Gitblit API client library
|
|
652 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
653 |
-->
|
|
654 |
<target name="buildApiLibrary" depends="compile" description="Builds the Gitblit RPC client library">
|
|
655 |
<echo>Building Gitblit API Library ${gb.version}</echo>
|
|
656 |
|
d65f71
|
657 |
<!-- Build API Library jar -->
|
JM |
658 |
<genjar jarfile="gbapi-${gb.version}.jar">
|
|
659 |
<class name="com.gitblit.Keys" />
|
773bb6
|
660 |
<class name="com.gitblit.client.GitblitClient" />
|
JM |
661 |
<classpath refid="master-classpath" />
|
|
662 |
<classfilter>
|
|
663 |
<exclude name="com.google.gson." />
|
9119cf
|
664 |
<exclude name="com.sun.syndication." />
|
773bb6
|
665 |
</classfilter>
|
JM |
666 |
<manifest>
|
|
667 |
<attribute name="Specification-Version" value="${gb.version}" />
|
|
668 |
<attribute name="Release-Date" value="${gb.versionDate}" />
|
|
669 |
</manifest>
|
|
670 |
</genjar>
|
|
671 |
|
d65f71
|
672 |
<!-- Build API sources jar -->
|
JM |
673 |
<zip destfile="gbapi-${gb.version}-sources.jar">
|
|
674 |
<fileset dir="${basedir}/src" defaultexcludes="yes">
|
|
675 |
<include name="com/gitblit/Constants.java"/>
|
|
676 |
<include name="com/gitblit/GitBlitException.java"/>
|
|
677 |
<include name="com/gitblit/Keys.java"/>
|
|
678 |
<include name="com/gitblit/client/**/*.java"/>
|
|
679 |
<include name="com/gitblit/models/**/*.java"/>
|
|
680 |
<include name="com/gitblit/utils/**/*.java"/>
|
|
681 |
</fileset>
|
|
682 |
</zip>
|
|
683 |
|
|
684 |
<!-- Build API JavaDoc jar -->
|
|
685 |
<javadoc destdir="${basedir}/javadoc">
|
|
686 |
<fileset dir="${basedir}/src" defaultexcludes="yes">
|
|
687 |
<include name="com/gitblit/Constants.java"/>
|
|
688 |
<include name="com/gitblit/GitBlitException.java"/>
|
|
689 |
<include name="com/gitblit/Keys.java"/>
|
|
690 |
<include name="com/gitblit/client/**/*.java"/>
|
|
691 |
<include name="com/gitblit/models/**/*.java"/>
|
|
692 |
<include name="com/gitblit/utils/**/*.java"/>
|
|
693 |
</fileset>
|
|
694 |
</javadoc>
|
|
695 |
<zip destfile="gbapi-${gb.version}-javadoc.jar">
|
|
696 |
<fileset dir="${basedir}/javadoc" />
|
|
697 |
</zip>
|
|
698 |
|
773bb6
|
699 |
<!-- Build the API library zip file -->
|
JM |
700 |
<zip destfile="${gbapi.zipfile}">
|
|
701 |
<fileset dir="${basedir}">
|
d65f71
|
702 |
<include name="gbapi-${gb.version}.jar" />
|
JM |
703 |
<include name="gbapi-${gb.version}-sources.jar" />
|
|
704 |
<include name="gbapi-${gb.version}-javadoc.jar" />
|
|
705 |
<include name="LICENSE" />
|
|
706 |
<include name="NOTICE" />
|
773bb6
|
707 |
</fileset>
|
JM |
708 |
<fileset dir="${basedir}/ext">
|
|
709 |
<include name="gson*.jar" />
|
|
710 |
<exclude name="gson*-sources.jar" />
|
|
711 |
<exclude name="gson*-javadoc.jar" />
|
9119cf
|
712 |
<include name="rome*.jar" />
|
JM |
713 |
<exclude name="rome*-sources.jar" />
|
|
714 |
<exclude name="rome*-javadoc.jar" />
|
9f8439
|
715 |
<include name="jdom*.jar" />
|
JM |
716 |
<exclude name="jdom*-sources.jar" />
|
|
717 |
<exclude name="jdom*-javadoc.jar" />
|
773bb6
|
718 |
</fileset>
|
JM |
719 |
</zip>
|
|
720 |
</target>
|
841651
|
721 |
|
f6740d
|
722 |
|
85c2e6
|
723 |
<!--
|
JM |
724 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
725 |
Build the Gitblit Website
|
|
726 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
727 |
-->
|
|
728 |
<target name="buildSite" depends="compile" description="Build the Gitblit website">
|
|
729 |
|
|
730 |
<echo>Building Gitblit Website ${gb.version}</echo>
|
|
731 |
|
dd7961
|
732 |
<!-- Build Site -->
|
85c2e6
|
733 |
<delete dir="${project.site.dir}" />
|
JM |
734 |
<mkdir dir="${project.site.dir}" />
|
|
735 |
<copy todir="${project.site.dir}">
|
f13c4c
|
736 |
<!-- Copy selected Gitblit resources -->
|
5450d0
|
737 |
<fileset dir="${project.resources.dir}">
|
3cc6e2
|
738 |
<include name="bootstrap/**/*" />
|
JM |
739 |
<include name="gitblit.css" />
|
8c5d72
|
740 |
<include name="gitblt_25_white.png" />
|
dd7961
|
741 |
<include name="gitblt-favicon.png" />
|
f90dc6
|
742 |
<include name="lock_go_16x16.png" />
|
JM |
743 |
<include name="lock_pull_16x16.png" />
|
|
744 |
<include name="shield_16x16.png" />
|
|
745 |
<include name="cold_16x16.png" />
|
|
746 |
<include name="bug_16x16.png" />
|
|
747 |
<include name="book_16x16.png" />
|
|
748 |
<include name="blank.png" />
|
831469
|
749 |
<include name="federated_16x16.png" />
|
0aa6ec
|
750 |
<include name="arrow_page.png" />
|
dd7961
|
751 |
</fileset>
|
a4d249
|
752 |
|
f90dc6
|
753 |
<!-- Copy Doc images -->
|
dd7961
|
754 |
<fileset dir="${basedir}/docs">
|
f90dc6
|
755 |
<include name="*.png" />
|
f35a98
|
756 |
<include name="*.gif" />
|
f90dc6
|
757 |
<include name="*.js" />
|
JM |
758 |
</fileset>
|
|
759 |
</copy>
|
a4d249
|
760 |
|
f90dc6
|
761 |
<!-- Copy Fancybox -->
|
85c2e6
|
762 |
<mkdir dir="${project.site.dir}/fancybox" />
|
JM |
763 |
<copy todir="${project.site.dir}/fancybox">
|
a4d249
|
764 |
<fileset dir="${basedir}/docs/fancybox">
|
f90dc6
|
765 |
<exclude name="thumbs.db" />
|
JM |
766 |
</fileset>
|
|
767 |
</copy>
|
a4d249
|
768 |
|
230632
|
769 |
<!-- Copy google-code-prettify -->
|
JM |
770 |
<mkdir dir="${basedir}/src/com/gitblit/wicket/pages/prettify" />
|
|
771 |
<copy todir="${project.site.dir}/prettify">
|
|
772 |
<fileset dir="${basedir}/src/com/gitblit/wicket/pages/prettify">
|
|
773 |
<exclude name="thumbs.db" />
|
|
774 |
</fileset>
|
|
775 |
</copy>
|
|
776 |
|
24d08f
|
777 |
<!-- Generate thumbnails of screenshots -->
|
22fc5e
|
778 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildThumbnails">
|
24d08f
|
779 |
<classpath refid="master-classpath" />
|
JM |
780 |
|
|
781 |
<arg value="--sourceFolder" />
|
|
782 |
<arg value="${basedir}/docs/screenshots" />
|
|
783 |
|
|
784 |
<arg value="--destinationFolder" />
|
85c2e6
|
785 |
<arg value="${project.site.dir}/thumbs" />
|
24d08f
|
786 |
|
JM |
787 |
<arg value="--maximumDimension" />
|
|
788 |
<arg value="250" />
|
|
789 |
</java>
|
a4d249
|
790 |
|
f90dc6
|
791 |
<!-- Copy screenshots -->
|
85c2e6
|
792 |
<mkdir dir="${project.site.dir}/screenshots" />
|
JM |
793 |
<copy todir="${project.site.dir}/screenshots">
|
f90dc6
|
794 |
<fileset dir="${basedir}/docs/screenshots">
|
JM |
795 |
<include name="*.png" />
|
|
796 |
</fileset>
|
|
797 |
</copy>
|
|
798 |
|
a4d249
|
799 |
<!-- Build site pages -->
|
22fc5e
|
800 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildSite">
|
dd7961
|
801 |
<classpath refid="master-classpath" />
|
JM |
802 |
<arg value="--sourceFolder" />
|
|
803 |
<arg value="${basedir}/docs" />
|
a4d249
|
804 |
|
dd7961
|
805 |
<arg value="--outputFolder" />
|
85c2e6
|
806 |
<arg value="${project.site.dir}" />
|
dd7961
|
807 |
|
JM |
808 |
<arg value="--pageHeader" />
|
81f881
|
809 |
<arg value="${basedir}/docs/site_header.html" />
|
e7a153
|
810 |
|
dd7961
|
811 |
<arg value="--pageFooter" />
|
81f881
|
812 |
<arg value="${basedir}/docs/site_footer.html" />
|
a4d249
|
813 |
|
e7a153
|
814 |
<arg value="--analyticsSnippet" />
|
JM |
815 |
<arg value="${basedir}/docs/site_analytics.html" />
|
|
816 |
|
|
817 |
<arg value="--adSnippet" />
|
|
818 |
<arg value="${basedir}/docs/site_ads.html" />
|
|
819 |
|
e0054b
|
820 |
<arg value="--alias" />
|
JM |
821 |
<arg value="index=overview" />
|
424fe1
|
822 |
|
1f9dae
|
823 |
<arg value="--alias" />
|
4c835e
|
824 |
<arg value="properties=settings" />
|
a4d249
|
825 |
|
JM |
826 |
<arg value="--substitute" />
|
|
827 |
<arg value="%VERSION%=${gb.version}" />
|
|
828 |
|
|
829 |
<arg value="--substitute" />
|
85c2e6
|
830 |
<arg value="%GO%=${distribution.zipfile}" />
|
JM |
831 |
|
|
832 |
<arg value="--substitute" />
|
|
833 |
<arg value="%WAR%=${distribution.warfile}" />
|
a4d249
|
834 |
|
JM |
835 |
<arg value="--substitute" />
|
f6740d
|
836 |
<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
|
JM |
837 |
|
|
838 |
<arg value="--substitute" />
|
d65f71
|
839 |
<arg value="%MANAGER%=${manager.zipfile}" />
|
773bb6
|
840 |
|
JM |
841 |
<arg value="--substitute" />
|
|
842 |
<arg value="%API%=${gbapi.zipfile}" />
|
841651
|
843 |
|
JM |
844 |
<arg value="--substitute" />
|
b774de
|
845 |
<arg value="%EXPRESS%=${express.zipfile}" />
|
JM |
846 |
|
|
847 |
<arg value="--substitute" />
|
d39680
|
848 |
<arg value="%BUILDDATE%=${gb.versionDate}" />
|
a4d249
|
849 |
|
JM |
850 |
<arg value="--substitute" />
|
|
851 |
<arg value="%JGIT%=${jgit.version}" />
|
1f9dae
|
852 |
|
a3f474
|
853 |
<arg value="--properties" />
|
1f9dae
|
854 |
<arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
|
230632
|
855 |
|
JM |
856 |
<arg value="--nomarkdown" />
|
|
857 |
<arg value="%BEGINCODE%:%ENDCODE%" />
|
|
858 |
|
|
859 |
<arg value="--substitute" />
|
|
860 |
<arg value=""%BEGINCODE%=<pre class='prettyprint lang-java'>"" />
|
|
861 |
|
|
862 |
<arg value="--substitute" />
|
|
863 |
<arg value="%ENDCODE%=</pre>" />
|
1f9dae
|
864 |
|
5c563c
|
865 |
<arg value="--regex" />
|
JM |
866 |
<arg value=""\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>"" />
|
|
867 |
|
a3f474
|
868 |
</java>
|
85c2e6
|
869 |
</target>
|
b774de
|
870 |
|
424fe1
|
871 |
|
85c2e6
|
872 |
<!--
|
JM |
873 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
874 |
Compile from source, publish binaries, and build & deploy site
|
|
875 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
876 |
-->
|
9be337
|
877 |
<target name="buildAll" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary,buildSite">
|
1f9dae
|
878 |
<!-- Cleanup -->
|
2a7306
|
879 |
<delete dir="${project.build.dir}" />
|
85c2e6
|
880 |
<delete dir="${project.war.dir}" />
|
JM |
881 |
<delete dir="${project.deploy.dir}" />
|
b774de
|
882 |
<delete dir="${project.express.dir}" />
|
5fe7df
|
883 |
</target>
|
b774de
|
884 |
|
746aaf
|
885 |
|
JM |
886 |
<!--
|
|
887 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
888 |
Update the gh-pages branch with the current site
|
|
889 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
890 |
-->
|
|
891 |
<target name="updateGhPages" depends="buildSite">
|
|
892 |
<!-- Build gh-pages branch -->
|
|
893 |
<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildGhPages">
|
|
894 |
<classpath refid="master-classpath" />
|
|
895 |
<arg value="--sourceFolder" />
|
|
896 |
<arg value="${basedir}/site" />
|
|
897 |
|
|
898 |
<arg value="--repository" />
|
|
899 |
<arg value="${basedir}" />
|
|
900 |
|
|
901 |
<arg value="--obliterate" />
|
|
902 |
</java>
|
|
903 |
</target>
|
|
904 |
|
b774de
|
905 |
|
85c2e6
|
906 |
<!--
|
JM |
907 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
908 |
Publish binaries to Google Code
|
|
909 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
910 |
-->
|
a48c33
|
911 |
<target name="publishBinaries" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary" description="Publish the Gitblit binaries to Google Code">
|
b774de
|
912 |
|
85c2e6
|
913 |
<echo>Uploading Gitblit ${gb.version} binaries</echo>
|
b774de
|
914 |
|
773bb6
|
915 |
<!-- Upload Gitblit GO ZIP file -->
|
85c2e6
|
916 |
<gcupload
|
JM |
917 |
username="${googlecode.user}"
|
|
918 |
password="${googlecode.password}"
|
|
919 |
projectname="gitblit"
|
|
920 |
filename="${distribution.zipfile}"
|
|
921 |
targetfilename="gitblit-${gb.version}.zip"
|
ed21d2
|
922 |
summary="Gitblit GO v${gb.version} (standalone, integrated Gitblit server)"
|
85c2e6
|
923 |
labels="Featured, Type-Package, OpSys-All" />
|
b774de
|
924 |
|
773bb6
|
925 |
<!-- Upload Gitblit WAR file -->
|
85c2e6
|
926 |
<gcupload
|
JM |
927 |
username="${googlecode.user}"
|
|
928 |
password="${googlecode.password}"
|
|
929 |
projectname="gitblit"
|
|
930 |
filename="${distribution.warfile}"
|
|
931 |
targetfilename="gitblit-${gb.version}.war"
|
ed21d2
|
932 |
summary="Gitblit WAR v${gb.version} (standard WAR webapp for servlet containers)"
|
85c2e6
|
933 |
labels="Featured, Type-Package, OpSys-All" />
|
b774de
|
934 |
|
773bb6
|
935 |
<!-- Upload Gitblit FedClient -->
|
f6740d
|
936 |
<gcupload
|
JM |
937 |
username="${googlecode.user}"
|
|
938 |
password="${googlecode.password}"
|
|
939 |
projectname="gitblit"
|
|
940 |
filename="${fedclient.zipfile}"
|
|
941 |
targetfilename="fedclient-${gb.version}.zip"
|
|
942 |
summary="Gitblit Federation Client v${gb.version} (command-line tool to clone data from federated Gitblit instances)"
|
|
943 |
labels="Featured, Type-Package, OpSys-All" />
|
841651
|
944 |
|
773bb6
|
945 |
<!-- Upload Gitblit Manager -->
|
841651
|
946 |
<gcupload
|
JM |
947 |
username="${googlecode.user}"
|
|
948 |
password="${googlecode.password}"
|
|
949 |
projectname="gitblit"
|
d65f71
|
950 |
filename="${manager.zipfile}"
|
JM |
951 |
targetfilename="manager-${gb.version}.zip"
|
a7a9f7
|
952 |
summary="Gitblit Manager v${gb.version} (Swing tool to remotely administer a Gitblit server)"
|
773bb6
|
953 |
labels="Featured, Type-Package, OpSys-All" />
|
b774de
|
954 |
|
773bb6
|
955 |
<!-- Upload Gitblit API Library -->
|
JM |
956 |
<gcupload
|
|
957 |
username="${googlecode.user}"
|
|
958 |
password="${googlecode.password}"
|
|
959 |
projectname="gitblit"
|
|
960 |
filename="${gbapi.zipfile}"
|
|
961 |
targetfilename="gbapi-${gb.version}.zip"
|
|
962 |
summary="Gitblit API Library v${gb.version} (JSON RPC library to integrate with your software)"
|
841651
|
963 |
labels="Featured, Type-Package, OpSys-All" />
|
b774de
|
964 |
|
JM |
965 |
<!-- Upload Gitblit Express for RedHat OpenShift -->
|
|
966 |
<gcupload
|
|
967 |
username="${googlecode.user}"
|
|
968 |
password="${googlecode.password}"
|
|
969 |
projectname="gitblit"
|
|
970 |
filename="${express.zipfile}"
|
|
971 |
targetfilename="express-${gb.version}.zip"
|
|
972 |
summary="Gitblit Express v${gb.version} (run Gitblit on RedHat's OpenShift cloud)"
|
|
973 |
labels="Featured, Type-Package, OpSys-All" />
|
|
974 |
|
5450d0
|
975 |
</target>
|
JM |
976 |
|
b774de
|
977 |
|
85c2e6
|
978 |
<!--
|
JM |
979 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
b774de
|
980 |
Publish site to site hosting service
|
85c2e6
|
981 |
You must add ext/commons-net-1.4.0.jar to your ANT classpath.
|
JM |
982 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
983 |
-->
|
746aaf
|
984 |
<target name="publishSite" depends="buildSite,updateGhPages" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
|
b774de
|
985 |
|
85c2e6
|
986 |
<echo>Uploading Gitblit ${gb.version} website</echo>
|
b774de
|
987 |
|
81f881
|
988 |
<ftp server="${ftp.server}"
|
JM |
989 |
userid="${ftp.user}"
|
|
990 |
password="${ftp.password}"
|
|
991 |
remotedir="${ftp.dir}"
|
|
992 |
passive="true"
|
|
993 |
verbose="yes">
|
85c2e6
|
994 |
<fileset dir="${project.site.dir}" />
|
81f881
|
995 |
</ftp>
|
JM |
996 |
</target>
|
85c2e6
|
997 |
|
b774de
|
998 |
|
85c2e6
|
999 |
<!--
|
JM |
1000 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
1001 |
Compile from source, publish binaries, and build & deploy site
|
|
1002 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
1003 |
-->
|
773bb6
|
1004 |
<target name="publishAll" depends="publishBinaries,publishSite">
|
85c2e6
|
1005 |
<!-- Cleanup -->
|
JM |
1006 |
<delete dir="${project.build.dir}" />
|
|
1007 |
<delete dir="${project.war.dir}" />
|
|
1008 |
<delete dir="${project.deploy.dir}" />
|
|
1009 |
</target>
|
764d94
|
1010 |
</project>
|