commit | author | age
|
5fe7df
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
f6b200
|
2 |
<project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie">
|
5fe7df
|
3 |
|
ff3015
|
4 |
<!--
|
JM |
5 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
6 |
Retrieve Moxie Toolkit
|
f38c90
|
7 |
|
JM |
8 |
documentation @ http://gitblit.github.io/moxie
|
ff3015
|
9 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
10 |
-->
|
79cad5
|
11 |
<property name="moxie.version" value="0.9.1" />
|
a4c680
|
12 |
<property name="moxie.url" value="http://gitblit.github.io/moxie/maven" />
|
f6b200
|
13 |
<property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
|
JM |
14 |
<property name="moxie.dir" value="${user.home}/.moxie" />
|
5450d0
|
15 |
|
f6b200
|
16 |
<!-- Download Moxie from it's Maven repository to user.home -->
|
8e2b99
|
17 |
<mkdir dir="${moxie.dir}" />
|
abd152
|
18 |
<get src="${moxie.url}/com/gitblit/moxie/moxie-toolkit/${moxie.version}/${moxie.jar}"
|
f6b200
|
19 |
dest="${moxie.dir}" skipexisting="true" verbose="true" />
|
JM |
20 |
|
|
21 |
<!-- Register Moxie tasks -->
|
|
22 |
<taskdef uri="antlib:org.moxie">
|
|
23 |
<classpath location="${moxie.dir}/${moxie.jar}" />
|
|
24 |
</taskdef>
|
|
25 |
|
|
26 |
<!-- Project directories -->
|
|
27 |
<property name="project.src.dir" value="${basedir}/src/main/java" />
|
|
28 |
<property name="project.resources.dir" value="${basedir}/src/main/resources" />
|
|
29 |
<property name="project.distrib.dir" value="${basedir}/src/main/distrib" />
|
85c2e6
|
30 |
|
JM |
31 |
<!--
|
|
32 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
33 |
Initialize Moxie and setup build properties
|
85c2e6
|
34 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
35 |
-->
|
f6b200
|
36 |
<target name="prepare">
|
5450d0
|
37 |
|
f6b200
|
38 |
<!-- Setup Ant build from build.moxie and resolve dependencies.
|
358545
|
39 |
If it exists, build.properties is automatically loaded.
|
JM |
40 |
Explicitly set mxroot allowing CI servers to override the default. -->
|
|
41 |
<mx:init verbose="no" mxroot="${moxie.dir}" />
|
f6b200
|
42 |
|
JM |
43 |
<!-- Set Ant project properties -->
|
|
44 |
<property name="distribution.zipfile" value="gitblit-${project.version}.zip" />
|
|
45 |
<property name="distribution.tgzfile" value="gitblit-${project.version}.tar.gz" />
|
|
46 |
<property name="distribution.warfile" value="gitblit-${project.version}.war" />
|
|
47 |
<property name="fedclient.zipfile" value="fedclient-${project.version}.zip" />
|
|
48 |
<property name="manager.zipfile" value="manager-${project.version}.zip" />
|
|
49 |
<property name="authority.zipfile" value="authority-${project.version}.zip" />
|
|
50 |
<property name="gbapi.zipfile" value="gbapi-${project.version}.zip" />
|
|
51 |
<property name="express.zipfile" value="express-${project.version}.zip" />
|
f12685
|
52 |
<property name="maven.directory" value="${basedir}/../gitblit-maven" />
|
JM |
53 |
|
f6b200
|
54 |
<!-- Download links -->
|
JM |
55 |
<property name="gc.url" value="http://code.google.com/p/gitblit/downloads/detail?name=" />
|
|
56 |
</target>
|
|
57 |
|
|
58 |
|
|
59 |
<!--
|
|
60 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
61 |
Cleanup all build artifacts and directories
|
|
62 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
63 |
-->
|
|
64 |
<target name="clean" depends="prepare" description="Cleanup all build artifacts and directories">
|
93d506
|
65 |
|
f6b200
|
66 |
<!-- Clean build and target directories -->
|
JM |
67 |
<mx:clean />
|
|
68 |
|
|
69 |
</target>
|
|
70 |
|
|
71 |
|
|
72 |
<!--
|
|
73 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
74 |
Setup
|
|
75 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
76 |
-->
|
|
77 |
<target name="setup" depends="prepare" description="Setup up project">
|
|
78 |
|
|
79 |
<!-- copy distrib/data to project data directory -->
|
93d506
|
80 |
<mkdir dir="${basedir}/data" />
|
JM |
81 |
<copy todir="${basedir}/data" overwrite="false">
|
f6b200
|
82 |
<fileset dir="${project.distrib.dir}/data" />
|
f98825
|
83 |
</copy>
|
d8a0f1
|
84 |
|
b9afce
|
85 |
<!-- copy gitblit.properties to the source directory.
|
f6b200
|
86 |
this file is only used for parsing setting descriptions. -->
|
b9afce
|
87 |
<copy tofile="${project.src.dir}/reference.properties" overwrite="true"
|
f6b200
|
88 |
file="${project.distrib.dir}/data/gitblit.properties" />
|
ffbf03
|
89 |
|
JM |
90 |
<!-- copy clientapps.json to the source directory.
|
|
91 |
this file is only used if a local file is not provided. -->
|
|
92 |
<copy tofile="${project.src.dir}/clientapps.json" overwrite="true"
|
|
93 |
file="${project.distrib.dir}/data/clientapps.json" />
|
289efb
|
94 |
|
85c2e6
|
95 |
</target>
|
JM |
96 |
|
f6b200
|
97 |
|
JM |
98 |
<!--
|
|
99 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
100 |
Compile
|
|
101 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
102 |
-->
|
|
103 |
<target name="compile" depends="setup" description="compiles Gitblit from source">
|
|
104 |
|
|
105 |
<!-- Generate the Keys class from the properties file -->
|
|
106 |
<mx:keys propertiesfile="${project.distrib.dir}/data/gitblit.properties"
|
|
107 |
outputclass="com.gitblit.Keys"
|
|
108 |
todir="${project.src.dir}" />
|
|
109 |
|
433190
|
110 |
<!-- Compile project -->
|
JM |
111 |
<mx:javac scope="compile" clean="true" />
|
f6b200
|
112 |
|
JM |
113 |
</target>
|
|
114 |
|
|
115 |
|
|
116 |
<!--
|
|
117 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
118 |
Report the compile dependencies on the console
|
|
119 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
120 |
-->
|
|
121 |
<target name="report" depends="prepare" description="generate dependency report">
|
|
122 |
|
|
123 |
<!-- Report compile dependencies to the console -->
|
|
124 |
<mx:report scope="compile" destfile="${project.targetDirectory}/dependencies.txt" />
|
|
125 |
|
|
126 |
</target>
|
|
127 |
|
|
128 |
|
|
129 |
<!--
|
|
130 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
131 |
Test
|
|
132 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
133 |
-->
|
|
134 |
<target name="test" depends="compile" description="compiles Gitblit from source and runs unit tests">
|
|
135 |
|
|
136 |
<!-- Compile unit tests -->
|
|
137 |
<mx:javac scope="test" />
|
|
138 |
|
|
139 |
<!-- Run unit tests -->
|
|
140 |
<mx:test failonerror="true" />
|
|
141 |
|
|
142 |
</target>
|
|
143 |
|
|
144 |
|
|
145 |
<!--
|
|
146 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
147 |
Run Gitblit GO
|
|
148 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
149 |
-->
|
|
150 |
<target name="run" depends="compile" description="Run Gitblit GO">
|
1e2c11
|
151 |
<!-- copy static files -->
|
GH |
152 |
<copy todir="${basedir}/build/classes" overwrite="false">
|
|
153 |
<fileset dir="${project.resources.dir}">
|
|
154 |
<exclude name="thumbs.db" />
|
|
155 |
<exclude name="*.mkd" />
|
|
156 |
</fileset>
|
|
157 |
</copy>
|
f6b200
|
158 |
|
JM |
159 |
<!-- run the mainclass in a separate JVM -->
|
|
160 |
<mx:run fork="true" />
|
|
161 |
|
|
162 |
</target>
|
|
163 |
|
85c2e6
|
164 |
|
JM |
165 |
<!--
|
|
166 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
167 |
Build Gitblit GO
|
|
168 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
169 |
-->
|
f6b200
|
170 |
<target name="buildGO" depends="compile" description="Build Gitblit GO distribution">
|
85c2e6
|
171 |
|
f6b200
|
172 |
<echo>Building Gitblit GO ${project.version}</echo>
|
85c2e6
|
173 |
|
f6b200
|
174 |
<local name="go.dir" />
|
JM |
175 |
<property name="go.dir" value="${project.outputDirectory}/go" />
|
|
176 |
<delete dir="${go.dir}" />
|
85c2e6
|
177 |
|
f6b200
|
178 |
<prepareDataDirectory toDir="${go.dir}/data" />
|
JM |
179 |
|
|
180 |
<!-- Build jar -->
|
|
181 |
<mx:jar destfile="${go.dir}/gitblit.jar" includeresources="true">
|
|
182 |
<mainclass name="com.gitblit.GitBlitServer" />
|
|
183 |
<launcher paths="ext" />
|
|
184 |
</mx:jar>
|
|
185 |
|
|
186 |
<!-- Generate the docs for the GO build -->
|
|
187 |
<generateDocs toDir="${go.dir}/docs" />
|
|
188 |
|
|
189 |
<!-- Create GO Windows Zip deployment -->
|
|
190 |
<mx:zip basedir="${go.dir}">
|
|
191 |
<!-- LICENSE and NOTICE -->
|
|
192 |
<fileset dir="${basedir}" >
|
7c643b
|
193 |
<include name="LICENSE" />
|
JM |
194 |
<include name="NOTICE" />
|
93d506
|
195 |
</fileset>
|
dbf594
|
196 |
<!-- Windows distrib files -->
|
f6b200
|
197 |
<zipfileset dir="${project.distrib.dir}/win" />
|
dbf594
|
198 |
<!-- Gitblit Authority data -->
|
JM |
199 |
<zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
|
f6b200
|
200 |
<!-- include all dependencies -->
|
JM |
201 |
<dependencies prefix="ext" />
|
|
202 |
</mx:zip>
|
5fe7df
|
203 |
|
f6b200
|
204 |
<!-- Create GO Linux/OSX tar.gz deployment -->
|
JM |
205 |
<mx:tar basedir="${go.dir}" longfile="gnu" compression="gzip">
|
|
206 |
<!-- LICENSE and NOTICE -->
|
|
207 |
<fileset dir="${basedir}" >
|
|
208 |
<include name="LICENSE" />
|
|
209 |
<include name="NOTICE" />
|
9be337
|
210 |
</fileset>
|
dbf594
|
211 |
<!-- Linux/OSX distrib files -->
|
f6b200
|
212 |
<tarfileset dir="${project.distrib.dir}/linux" filemode="755" />
|
dbf594
|
213 |
<!-- Gitblit Authority data -->
|
JM |
214 |
<zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
|
f6b200
|
215 |
<!-- include all dependencies -->
|
JM |
216 |
<dependencies prefix="ext" />
|
|
217 |
</mx:tar>
|
85c2e6
|
218 |
|
JM |
219 |
</target>
|
|
220 |
|
|
221 |
|
|
222 |
<!--
|
|
223 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
224 |
Build Gitblit WAR
|
|
225 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
226 |
-->
|
|
227 |
<target name="buildWAR" depends="compile" description="Build Gitblit WAR">
|
|
228 |
|
f6b200
|
229 |
<echo>Building Gitblit WAR ${project.version}</echo>
|
85c2e6
|
230 |
|
f6b200
|
231 |
<local name="war.dir" />
|
JM |
232 |
<property name="war.dir" value="${project.outputDirectory}/war" />
|
|
233 |
<delete dir="${war.dir}" />
|
85c2e6
|
234 |
|
f6b200
|
235 |
<local name="webinf" />
|
JM |
236 |
<property name="webinf" value="${war.dir}/WEB-INF" />
|
fa54be
|
237 |
|
f6b200
|
238 |
<!-- Generate the docs for the WAR build -->
|
JM |
239 |
<generateDocs toDir="${webinf}/docs" />
|
93d506
|
240 |
|
f6b200
|
241 |
<!-- Prepare the data directory -->
|
JM |
242 |
<prepareDataDirectory toDir="${webinf}/data" />
|
fa54be
|
243 |
|
f6b200
|
244 |
<!-- Build the WAR web.xml from the prototype web.xml -->
|
9985ed
|
245 |
<mx:webxml sourcefile="${project.src.dir}/WEB-INF/web.xml" destfile="${webinf}/web.xml">
|
JM |
246 |
<replace token="@gb.version@" value="${project.version}" />
|
|
247 |
</mx:webxml>
|
85c2e6
|
248 |
|
b9afce
|
249 |
<!-- Gitblit jar -->
|
cacf8b
|
250 |
<mx:jar destfile="${webinf}/lib/gitblit.jar" includeresources="false" />
|
b9afce
|
251 |
|
85c2e6
|
252 |
<!-- Build the WAR file -->
|
f6b200
|
253 |
<mx:zip basedir="${war.dir}" destfile="${project.targetDirectory}/${distribution.warfile}" compress="true" >
|
JM |
254 |
<!-- Resources in root -->
|
6534b7
|
255 |
<fileset dir="${project.resources.dir}">
|
LM |
256 |
<exclude name="thumbs.db" />
|
f6b200
|
257 |
<exclude name="*.mkd" />
|
6534b7
|
258 |
</fileset>
|
f6b200
|
259 |
<!-- WEB-INF directory -->
|
JM |
260 |
<zipfileset prefix="WEB-INF" dir="${basedir}" >
|
|
261 |
<include name="LICENSE" />
|
|
262 |
<include name="NOTICE" />
|
|
263 |
</zipfileset>
|
d9c9fe
|
264 |
<zipfileset prefix="WEB-INF" file="${project.compileOutputDirectory}/WEB-INF/weblogic.xml" />
|
f6b200
|
265 |
<!-- include "war" tagged dependencies -->
|
JM |
266 |
<dependencies prefix="WEB-INF/lib" tag="war" />
|
|
267 |
</mx:zip>
|
85f639
|
268 |
</target>
|
LM |
269 |
|
|
270 |
|
f6740d
|
271 |
<!--
|
JM |
272 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
273 |
Build the stand-alone, command-line Gitblit Federation Client
|
|
274 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
275 |
-->
|
|
276 |
<target name="buildFederationClient" depends="compile" description="Builds the stand-alone Gitblit federation client">
|
f6b200
|
277 |
<echo>Building Gitblit Federation Client ${project.version}</echo>
|
f6740d
|
278 |
|
f6b200
|
279 |
<!-- generate jar by traversing the class hierarchy of the specified
|
JM |
280 |
classes, exclude any classes in classpath jars -->
|
b9afce
|
281 |
<mx:genjar tag="" includeresources="false" excludeClasspathJars="true"
|
f6b200
|
282 |
destfile="${project.targetDirectory}/fedclient.jar">
|
JM |
283 |
<mainclass name="com.gitblit.FederationClient" />
|
7b1240
|
284 |
<class name="com.gitblit.Keys" />
|
f6b200
|
285 |
<launcher paths="ext" />
|
JM |
286 |
<resource file="${project.compileOutputDirectory}/log4j.properties" />
|
|
287 |
</mx:genjar>
|
f6740d
|
288 |
|
JM |
289 |
<!-- Build the federation client zip file -->
|
f6b200
|
290 |
<mx:zip destfile="${project.targetDirectory}/${fedclient.zipfile}">
|
f6740d
|
291 |
<fileset dir="${basedir}">
|
d65f71
|
292 |
<include name="LICENSE" />
|
JM |
293 |
<include name="NOTICE" />
|
93d506
|
294 |
</fileset>
|
f6b200
|
295 |
<fileset dir="${project.targetDirectory}">
|
93d506
|
296 |
<include name="fedclient.jar" />
|
f6740d
|
297 |
</fileset>
|
f6b200
|
298 |
<fileset dir="${project.distrib.dir}">
|
773bb6
|
299 |
<include name="federation.properties" />
|
f6740d
|
300 |
</fileset>
|
f6b200
|
301 |
<!-- include "fedclient" tagged dependencies -->
|
JM |
302 |
<dependencies prefix="ext" tag="fedclient" />
|
|
303 |
</mx:zip>
|
93d506
|
304 |
|
JM |
305 |
<!-- Cleanup -->
|
f6b200
|
306 |
<delete file="${project.targetDirectory}/fedclient.jar" />
|
JM |
307 |
|
f6740d
|
308 |
</target>
|
JM |
309 |
|
841651
|
310 |
|
JM |
311 |
<!--
|
|
312 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
313 |
Build a Gitblit filesystem for deployment to RedHat OpenShift Express
|
b774de
|
314 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
315 |
-->
|
9be337
|
316 |
<target name="buildExpress" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express">
|
f6b200
|
317 |
<echo>Building Gitblit Express for RedHat OpenShift ${project.version}</echo>
|
b774de
|
318 |
|
f6b200
|
319 |
<local name="express.dir" />
|
JM |
320 |
<property name="express.dir" value="${project.outputDirectory}/express" />
|
|
321 |
<delete dir="${express.dir}" />
|
b774de
|
322 |
|
JM |
323 |
<!-- Create the OpenShift filesystem -->
|
f6b200
|
324 |
<local name="deployments.root" />
|
JM |
325 |
<property name="deployments.root" value="${express.dir}/deployments/ROOT.war"/>
|
b774de
|
326 |
<mkdir dir="${deployments.root}" />
|
f6b200
|
327 |
<touch file="${express.dir}/deployments/ROOT.war.dodeploy" />
|
b774de
|
328 |
|
f6b200
|
329 |
<local name="webinf" />
|
JM |
330 |
<property name="webinf" value="${deployments.root}/WEB-INF" />
|
b774de
|
331 |
|
f6b200
|
332 |
<!-- Prepare the data directory -->
|
JM |
333 |
<prepareDataDirectory toDir="${webinf}/data" />
|
93d506
|
334 |
|
f6b200
|
335 |
<!-- Build the Express web.xml from the prototype web.xml and gitblit.properties -->
|
b774de
|
336 |
<!-- THIS FILE IS NOT OVERRIDDEN ONCE IT IS BUILT!!! -->
|
f6b200
|
337 |
<mx:webxml sourcefile="${project.src.dir}/WEB-INF/web.xml" destfile="${webinf}/web.xml"
|
9985ed
|
338 |
propertiesFile="${project.distrib.dir}/data/gitblit.properties"
|
JM |
339 |
skip="server.*">
|
|
340 |
<replace token="@gb.version@" value="${project.version}" />
|
|
341 |
</mx:webxml>
|
b774de
|
342 |
|
JM |
343 |
<!-- Gitblit classes -->
|
cacf8b
|
344 |
<mx:jar destfile="${webinf}/lib/gitblit.jar" includeresources="false" />
|
b774de
|
345 |
|
JM |
346 |
<!-- Build Express Zip file -->
|
f6b200
|
347 |
<mx:zip basedir="${express.dir}" destfile="${project.targetDirectory}/${express.zipfile}">
|
JM |
348 |
<fileset dir="${basedir}">
|
|
349 |
<include name="LICENSE" />
|
|
350 |
<include name="NOTICE" />
|
|
351 |
</fileset>
|
|
352 |
<!-- README -->
|
|
353 |
<zipfileset fullpath="README.gitblit" file="${project.siteSourceDirectory}/openshift.mkd" />
|
|
354 |
<!-- resources -->
|
|
355 |
<zipfileset prefix="deployments/ROOT.war" dir="${project.resources.dir}">
|
|
356 |
<exclude name="thumbs.db" />
|
|
357 |
<exclude name="*.mkd" />
|
|
358 |
</zipfileset>
|
|
359 |
<!-- include "war" tagged dependencies -->
|
|
360 |
<dependencies prefix="deployments/ROOT.war/WEB-INF/lib" tag="war" />
|
|
361 |
</mx:zip>
|
b774de
|
362 |
|
JM |
363 |
</target>
|
|
364 |
|
|
365 |
|
|
366 |
<!--
|
|
367 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
a7a9f7
|
368 |
Build the stand-alone, Gitblit Manager
|
841651
|
369 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
370 |
-->
|
a7a9f7
|
371 |
<target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
|
f6b200
|
372 |
<echo>Building Gitblit Manager ${project.version}</echo>
|
b774de
|
373 |
|
f6b200
|
374 |
<!-- generate jar by traversing the class hierarchy of the specified
|
JM |
375 |
classes, exclude any classes in classpath jars -->
|
b9afce
|
376 |
<mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
|
f6b200
|
377 |
destfile="${project.targetDirectory}/manager.jar">
|
JM |
378 |
<resource file="${project.src.dir}/com/gitblit/client/splash.png" />
|
|
379 |
<resource file="${project.resources.dir}/gitblt-favicon.png" />
|
|
380 |
<resource file="${project.resources.dir}/gitweb-favicon.png" />
|
|
381 |
<resource file="${project.resources.dir}/git-orange-16x16.png" />
|
|
382 |
<resource file="${project.resources.dir}/user_16x16.png" />
|
|
383 |
<resource file="${project.resources.dir}/users_16x16.png" />
|
|
384 |
<resource file="${project.resources.dir}/settings_16x16.png" />
|
|
385 |
<resource file="${project.resources.dir}/lock_go_16x16.png" />
|
|
386 |
<resource file="${project.resources.dir}/lock_pull_16x16.png" />
|
|
387 |
<resource file="${project.resources.dir}/shield_16x16.png" />
|
|
388 |
<resource file="${project.resources.dir}/federated_16x16.png" />
|
|
389 |
<resource file="${project.resources.dir}/cold_16x16.png" />
|
|
390 |
<resource file="${project.resources.dir}/book_16x16.png" />
|
|
391 |
<resource file="${project.resources.dir}/bug_16x16.png" />
|
|
392 |
<resource file="${project.resources.dir}/health_16x16.png" />
|
|
393 |
<resource file="${project.resources.dir}/feed_16x16.png" />
|
|
394 |
<resource file="${project.resources.dir}/bullet_feed.png" />
|
|
395 |
<resource file="${project.resources.dir}/search-icon.png" />
|
|
396 |
<resource file="${project.resources.dir}/commit_changes_16x16.png" />
|
|
397 |
<resource file="${project.resources.dir}/commit_merge_16x16.png" />
|
|
398 |
<resource file="${project.resources.dir}/commit_divide_16x16.png" />
|
|
399 |
<resource file="${project.resources.dir}/star_16x16.png" />
|
c44dd0
|
400 |
<resource file="${project.resources.dir}/mirror_16x16.png" />
|
f6b200
|
401 |
<resource file="${project.resources.dir}/blank.png" />
|
JM |
402 |
<resource file="${project.src.dir}/log4j.properties" />
|
|
403 |
<resource>
|
|
404 |
<!-- inlcude all translations -->
|
|
405 |
<fileset dir="${project.src.dir}/com/gitblit/wicket">
|
|
406 |
<include name="*.properties" />
|
|
407 |
</fileset>
|
|
408 |
</resource>
|
b774de
|
409 |
|
f6b200
|
410 |
<mainclass name="com.gitblit.client.GitblitManagerLauncher" />
|
c8e08d
|
411 |
<class name="com.gitblit.Keys" />
|
JM |
412 |
<class name="com.gitblit.client.GitblitClient" />
|
|
413 |
<class name="com.gitblit.models.FederationModel" />
|
|
414 |
<class name="com.gitblit.models.FederationProposal" />
|
|
415 |
<class name="com.gitblit.models.FederationSet" />
|
841651
|
416 |
<manifest>
|
JM |
417 |
<attribute name="SplashScreen-Image" value="splash.png" />
|
|
418 |
</manifest>
|
f6b200
|
419 |
</mx:genjar>
|
b774de
|
420 |
|
d65f71
|
421 |
<!-- Build Manager Zip file -->
|
f6b200
|
422 |
<mx:zip destfile="${project.targetDirectory}/${manager.zipfile}">
|
d65f71
|
423 |
<fileset dir="${basedir}">
|
JM |
424 |
<include name="LICENSE" />
|
|
425 |
<include name="NOTICE" />
|
|
426 |
</fileset>
|
f6b200
|
427 |
<fileset dir="${project.targetDirectory}">
|
JM |
428 |
<include name="manager.jar" />
|
93d506
|
429 |
</fileset>
|
f6b200
|
430 |
<!-- include "manager" tagged dependencies -->
|
JM |
431 |
<dependencies prefix="ext" tag="manager" />
|
|
432 |
</mx:zip>
|
93d506
|
433 |
|
JM |
434 |
<!-- Cleanup -->
|
f6b200
|
435 |
<delete file="${project.targetDirectory}/manager.jar" />
|
841651
|
436 |
</target>
|
4ad1eb
|
437 |
|
JM |
438 |
|
|
439 |
<!--
|
|
440 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
441 |
Build the Gitblit API client library
|
|
442 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
443 |
-->
|
|
444 |
<target name="buildApiLibrary" depends="compile" description="Builds the Gitblit RPC client library">
|
f6b200
|
445 |
<echo>Building Gitblit API Library ${project.version}</echo>
|
4ad1eb
|
446 |
|
f6b200
|
447 |
<local name="javadoc.dir" />
|
JM |
448 |
<property name="javadoc.dir" value="${project.outputDirectory}/javadoc" />
|
|
449 |
<delete dir="${javadoc.dir}" />
|
|
450 |
|
4ad1eb
|
451 |
<!-- Build API Library jar -->
|
b9afce
|
452 |
<mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
|
f6b200
|
453 |
destfile="${project.targetDirectory}/gbapi-${project.version}.jar">
|
4ad1eb
|
454 |
<class name="com.gitblit.Keys" />
|
JM |
455 |
<class name="com.gitblit.client.GitblitClient" />
|
4bef08
|
456 |
<class name="com.gitblit.models.FederationModel" />
|
JM |
457 |
<class name="com.gitblit.models.FederationProposal" />
|
|
458 |
<class name="com.gitblit.models.FederationSet" />
|
f6b200
|
459 |
</mx:genjar>
|
773bb6
|
460 |
|
4ad1eb
|
461 |
<!-- Build API sources jar -->
|
f6b200
|
462 |
<zip destfile="${project.targetDirectory}/gbapi-${project.version}-sources.jar">
|
JM |
463 |
<fileset dir="${project.src.dir}" defaultexcludes="yes">
|
4ad1eb
|
464 |
<include name="com/gitblit/Constants.java"/>
|
JM |
465 |
<include name="com/gitblit/GitBlitException.java"/>
|
|
466 |
<include name="com/gitblit/Keys.java"/>
|
|
467 |
<include name="com/gitblit/client/**/*.java"/>
|
|
468 |
<include name="com/gitblit/models/**/*.java"/>
|
|
469 |
<include name="com/gitblit/utils/**/*.java"/>
|
|
470 |
</fileset>
|
|
471 |
</zip>
|
|
472 |
|
|
473 |
<!-- Build API JavaDoc jar -->
|
f6b200
|
474 |
<mx:javadoc destdir="${javadoc.dir}" redirect="true">
|
JM |
475 |
<fileset dir="${project.src.dir}" defaultexcludes="yes">
|
4ad1eb
|
476 |
<include name="com/gitblit/Constants.java"/>
|
JM |
477 |
<include name="com/gitblit/GitBlitException.java"/>
|
|
478 |
<include name="com/gitblit/Keys.java"/>
|
|
479 |
<include name="com/gitblit/client/**/*.java"/>
|
|
480 |
<include name="com/gitblit/models/**/*.java"/>
|
|
481 |
<include name="com/gitblit/utils/**/*.java"/>
|
|
482 |
</fileset>
|
f6b200
|
483 |
</mx:javadoc>
|
JM |
484 |
|
|
485 |
<zip destfile="${project.targetDirectory}/gbapi-${project.version}-javadoc.jar">
|
|
486 |
<fileset dir="${javadoc.dir}" />
|
4ad1eb
|
487 |
</zip>
|
JM |
488 |
|
|
489 |
<!-- Build the API library zip file -->
|
f6b200
|
490 |
<mx:zip destfile="${project.targetDirectory}/${gbapi.zipfile}">
|
4ad1eb
|
491 |
<fileset dir="${basedir}">
|
93d506
|
492 |
<include name="LICENSE" />
|
JM |
493 |
<include name="NOTICE" />
|
|
494 |
</fileset>
|
f6b200
|
495 |
<fileset dir="${project.targetDirectory}">
|
JM |
496 |
<include name="gbapi-${project.version}.jar" />
|
|
497 |
<include name="gbapi-${project.version}-sources.jar" />
|
|
498 |
<include name="gbapi-${project.version}-javadoc.jar" />
|
4ad1eb
|
499 |
</fileset>
|
f6b200
|
500 |
<!-- include "api" tagged dependencies -->
|
JM |
501 |
<dependencies prefix="ext" tag="api" />
|
|
502 |
</mx:zip>
|
93d506
|
503 |
|
JM |
504 |
<!-- Cleanup -->
|
|
505 |
<delete>
|
f6b200
|
506 |
<fileset dir="${project.targetDirectory}">
|
93d506
|
507 |
<include name="javadoc/**" />
|
JM |
508 |
</fileset>
|
|
509 |
</delete>
|
4ad1eb
|
510 |
</target>
|
841651
|
511 |
|
f6740d
|
512 |
|
85c2e6
|
513 |
<!--
|
JM |
514 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
515 |
Build the Gitblit Website
|
|
516 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
517 |
-->
|
f6b200
|
518 |
<target name="buildSite" depends="prepare" description="Build the Gitblit website">
|
85c2e6
|
519 |
|
f6b200
|
520 |
<echo>Building Gitblit Website ${project.version}</echo>
|
JM |
521 |
|
|
522 |
<property name="releaselog" value="${basedir}/releases.moxie" />
|
85c2e6
|
523 |
|
dd7961
|
524 |
<!-- Build Site -->
|
f6b200
|
525 |
<mx:doc googleplusid="114464678392593421684" googleanalyticsid="UA-24377072-1"
|
JM |
526 |
googlePlusOne="true" minify="true" customless="custom.less">
|
|
527 |
<structure>
|
|
528 |
<menu name="about">
|
|
529 |
<page name="overview" src="siteindex.mkd" out="index.html" headerLinks="false" />
|
|
530 |
<page name="features" src="features.mkd" />
|
|
531 |
<page name="screenshots" src="screenshots.mkd" />
|
|
532 |
</menu>
|
8c99a7
|
533 |
<menu name="documentation" pager="true" pagerPlacement="bottom" pagerLayout="justified">
|
cc0477
|
534 |
<menu name="Gitblit GO" pager="true" pagerPlacement="bottom" pagerLayout="justified">
|
JM |
535 |
<page name="setup GO" src="setup_go.mkd" />
|
|
536 |
<page name="upgrade GO" src="upgrade_go.mkd" />
|
|
537 |
</menu>
|
8c99a7
|
538 |
<divider />
|
cc0477
|
539 |
<menu name="Gitblit WAR" pager="true" pagerPlacement="bottom" pagerLayout="justified">
|
JM |
540 |
<page name="setup WAR" src="setup_war.mkd" />
|
|
541 |
<page name="upgrade WAR" src="upgrade_war.mkd" />
|
|
542 |
</menu>
|
8c99a7
|
543 |
<divider />
|
044549
|
544 |
<menu name="Gitblit Express" pager="true" pagerPlacement="bottom" pagerLayout="justified">
|
JM |
545 |
<page name="setup Express" src="setup_express.mkd" />
|
|
546 |
<page name="upgrade Express" src="upgrade_express.mkd" />
|
|
547 |
</menu>
|
|
548 |
<divider />
|
cc0477
|
549 |
<page name="administration" src="administration.mkd" />
|
8c99a7
|
550 |
<page name="authentication" src="setup_authentication.mkd" />
|
JM |
551 |
<page name="push hooks" src="setup_hooks.mkd" />
|
|
552 |
<page name="lucene indexing" src="setup_lucene.mkd" />
|
|
553 |
<page name="reverse proxies" src="setup_proxy.mkd" />
|
044549
|
554 |
<page name="client app menus" src="setup_clientmenus.mkd" />
|
cc0477
|
555 |
<divider />
|
JM |
556 |
<page name="Gitblit as a viewer" src="setup_viewer.mkd" />
|
8c99a7
|
557 |
<divider />
|
JM |
558 |
<page name="git client setup" src="setup_client.mkd" />
|
|
559 |
<divider />
|
f6b200
|
560 |
<page name="federation" src="federation.mkd" />
|
JM |
561 |
<divider />
|
|
562 |
<page name="settings" src="properties.mkd" />
|
|
563 |
<page name="faq" src="faq.mkd" />
|
|
564 |
<divider />
|
|
565 |
<page name="design" src="design.mkd" />
|
|
566 |
<page name="rpc" src="rpc.mkd" />
|
|
567 |
</menu>
|
|
568 |
|
|
569 |
<menu name="releases">
|
|
570 |
<page name="release notes" out="releasenotes.html">
|
|
571 |
<template src="releasecurrent.ftl" data="${releaselog}" />
|
|
572 |
</page>
|
|
573 |
<page name="release history" out="releases.html">
|
|
574 |
<template src="releasehistory.ftl" data="${releaselog}" />
|
|
575 |
</page>
|
|
576 |
<divider />
|
|
577 |
<page name="roadmap" src="roadmap.mkd" />
|
|
578 |
</menu>
|
|
579 |
|
|
580 |
<menu name="downloads">
|
|
581 |
<link name="Gitblit GO (Windows)" src="${gc.url}gitblit-${project.releaseVersion}.zip" />
|
|
582 |
<link name="Gitblit GO (Linux/OSX)" src="${gc.url}gitblit-${project.releaseVersion}.tar.gz" />
|
|
583 |
<link name="Gitblit WAR" src="${gc.url}gitblit-${project.releaseVersion}.war" />
|
|
584 |
<link name="Gitblit Express" src="${gc.url}express-${project.releaseVersion}.zip" />
|
|
585 |
<divider />
|
|
586 |
<link name="Gitblit Manager" src="${gc.url}manager-${project.releaseVersion}.zip" />
|
|
587 |
<link name="Federation Client" src="${gc.url}fedclient-${project.releaseVersion}.zip" />
|
|
588 |
<divider />
|
|
589 |
<link name="API Library" src="${gc.url}gbapi-${project.releaseVersion}.zip" />
|
|
590 |
</menu>
|
|
591 |
|
|
592 |
<menu name="links">
|
724da5
|
593 |
<link name="Gitblit Demo (RELEASE)" src="https://demo-gitblit.rhcloud.com" />
|
JM |
594 |
<link name="Gitblit Next (SNAPSHOT)" src="https://next-gitblit.rhcloud.com" />
|
f6b200
|
595 |
<divider />
|
JM |
596 |
<link name="Github" src="${project.scmUrl}" />
|
|
597 |
<link name="Issues" src="${project.issuesUrl}" />
|
|
598 |
<link name="Discussion" src="${project.forumUrl}" />
|
|
599 |
<link name="Google+" src="${project.socialNetworkUrl}" />
|
|
600 |
<link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
|
|
601 |
</menu>
|
|
602 |
<divider />
|
|
603 |
</structure>
|
|
604 |
|
|
605 |
<replace token="%GCURL%" value="${gc.url}" />
|
|
606 |
|
|
607 |
<properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
|
|
608 |
|
|
609 |
<regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />
|
3daba4
|
610 |
<regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit/gitblit/pull/$3'>pull request #$3</a>" />
|
f6b200
|
611 |
|
JM |
612 |
<!-- Set the logo from the mx:doc resources -->
|
|
613 |
<logo file="${project.resources.dir}/gitblt_25_white.png" />
|
|
614 |
<favicon file="${project.resources.dir}/gitblt-favicon.png" />
|
|
615 |
|
|
616 |
<resource>
|
|
617 |
<fileset dir="${project.resources.dir}">
|
|
618 |
<include name="lock_go_16x16.png" />
|
|
619 |
<include name="lock_pull_16x16.png" />
|
|
620 |
<include name="shield_16x16.png" />
|
|
621 |
<include name="cold_16x16.png" />
|
|
622 |
<include name="bug_16x16.png" />
|
|
623 |
<include name="book_16x16.png" />
|
|
624 |
<include name="blank.png" />
|
|
625 |
<include name="federated_16x16.png" />
|
|
626 |
<include name="arrow_page.png" />
|
|
627 |
</fileset>
|
|
628 |
</resource>
|
|
629 |
</mx:doc>
|
a4d249
|
630 |
|
f90dc6
|
631 |
<!-- Copy Fancybox -->
|
f6b200
|
632 |
<mkdir dir="${project.siteTargetDirectory}/fancybox" />
|
JM |
633 |
<copy todir="${project.siteTargetDirectory}/fancybox">
|
|
634 |
<fileset dir="${project.siteSourceDirectory}/fancybox">
|
230632
|
635 |
<exclude name="thumbs.db" />
|
JM |
636 |
</fileset>
|
|
637 |
</copy>
|
|
638 |
|
24d08f
|
639 |
<!-- Generate thumbnails of screenshots -->
|
f6b200
|
640 |
<mx:thumbs input="png" output="png" maximumDimension="250"
|
JM |
641 |
sourceDir="${project.siteSourceDirectory}/screenshots"
|
|
642 |
destDir="${project.siteTargetDirectory}/thumbs" />
|
a4d249
|
643 |
|
f90dc6
|
644 |
<!-- Copy screenshots -->
|
f6b200
|
645 |
<mkdir dir="${project.siteTargetDirectory}/screenshots" />
|
JM |
646 |
<copy todir="${project.siteTargetDirectory}/screenshots">
|
|
647 |
<fileset dir="${project.siteSourceDirectory}/screenshots">
|
f90dc6
|
648 |
<include name="*.png" />
|
JM |
649 |
</fileset>
|
|
650 |
</copy>
|
|
651 |
|
85c2e6
|
652 |
</target>
|
b774de
|
653 |
|
f12685
|
654 |
<!--
|
JM |
655 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
656 |
Package and deploy RELEASE artifacts to the Maven repository
|
|
657 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
658 |
-->
|
392854
|
659 |
<target name="buildMavenArtifacts" depends="buildApiLibrary">
|
JM |
660 |
<mx:package />
|
f12685
|
661 |
<mx:deploy basedir="${maven.directory}" allowsnapshots="false" />
|
392854
|
662 |
<mx:deploy basedir="${maven.directory}" allowsnapshots="false"
|
JM |
663 |
name="Gitblit API" description="Gitblit JSON/RSS API client library"
|
|
664 |
tags="api" artifactid="gbapi" />
|
f12685
|
665 |
</target>
|
JM |
666 |
|
424fe1
|
667 |
|
85c2e6
|
668 |
<!--
|
JM |
669 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
670 |
Build all binaries and site
|
85c2e6
|
671 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
672 |
-->
|
289efb
|
673 |
<target name="buildAll" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary,buildSite" />
|
b774de
|
674 |
|
746aaf
|
675 |
|
JM |
676 |
<!--
|
|
677 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
678 |
Update the gh-pages branch with the current site
|
|
679 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
680 |
-->
|
5aec86
|
681 |
<target name="updateGhPages">
|
746aaf
|
682 |
<!-- Build gh-pages branch -->
|
f6b200
|
683 |
<mx:ghpages repositorydir="${basedir}" obliterate="true" />
|
746aaf
|
684 |
</target>
|
JM |
685 |
|
b774de
|
686 |
|
85c2e6
|
687 |
<!--
|
JM |
688 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
689 |
Publish binaries to Google Code
|
|
690 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
691 |
-->
|
bcc137
|
692 |
<target name="publishBinaries" depends="prepare" description="Publish the Gitblit binaries to Google Code">
|
b774de
|
693 |
|
f6b200
|
694 |
<echo>Uploading Gitblit ${project.version} binaries</echo>
|
b774de
|
695 |
|
f6b200
|
696 |
<!-- Upload Gitblit GO Windows ZIP file -->
|
JM |
697 |
<mx:gcupload
|
bcc137
|
698 |
username="${googlecode.user}"
|
JM |
699 |
password="${googlecode.password}"
|
|
700 |
projectname="gitblit"
|
|
701 |
filename="${project.targetDirectory}/${distribution.zipfile}"
|
|
702 |
targetFilename="gitblit-${project.version}.zip"
|
|
703 |
summary="Gitblit GO v${project.version} (standalone, integrated Gitblit server for Windows)" />
|
f6b200
|
704 |
|
JM |
705 |
<!-- Upload Gitblit GO Linux/Unix tar.gz file -->
|
|
706 |
<mx:gcupload
|
bcc137
|
707 |
username="${googlecode.user}"
|
JM |
708 |
password="${googlecode.password}"
|
|
709 |
projectname="gitblit"
|
|
710 |
filename="${project.targetDirectory}/${distribution.tgzfile}"
|
|
711 |
targetFilename="gitblit-${project.version}.tar.gz"
|
|
712 |
summary="Gitblit GO v${project.version} (standalone, integrated Gitblit server for Linux/Unix)" />
|
b774de
|
713 |
|
773bb6
|
714 |
<!-- Upload Gitblit WAR file -->
|
bcc137
|
715 |
<mx:gcupload
|
JM |
716 |
username="${googlecode.user}"
|
|
717 |
password="${googlecode.password}"
|
|
718 |
projectname="gitblit"
|
|
719 |
filename="${project.targetDirectory}/${distribution.warfile}"
|
|
720 |
targetFilename="gitblit-${project.version}.war"
|
|
721 |
summary="Gitblit WAR v${project.version} (standard WAR webapp for servlet containers)" />
|
b774de
|
722 |
|
773bb6
|
723 |
<!-- Upload Gitblit FedClient -->
|
bcc137
|
724 |
<mx:gcupload
|
JM |
725 |
username="${googlecode.user}"
|
|
726 |
password="${googlecode.password}"
|
|
727 |
projectname="gitblit"
|
|
728 |
filename="${project.targetDirectory}/${fedclient.zipfile}"
|
|
729 |
targetFilename="fedclient-${project.version}.zip"
|
|
730 |
summary="Gitblit Federation Client v${project.version} (command-line tool to clone data from federated Gitblit instances)" />
|
841651
|
731 |
|
773bb6
|
732 |
<!-- Upload Gitblit Manager -->
|
f6b200
|
733 |
<mx:gcupload
|
bcc137
|
734 |
username="${googlecode.user}"
|
JM |
735 |
password="${googlecode.password}"
|
|
736 |
projectname="gitblit"
|
|
737 |
filename="${project.targetDirectory}/${manager.zipfile}"
|
|
738 |
targetFilename="manager-${project.version}.zip"
|
|
739 |
summary="Gitblit Manager v${project.version} (Swing tool to remotely administer a Gitblit server)" />
|
4ad1eb
|
740 |
|
773bb6
|
741 |
<!-- Upload Gitblit API Library -->
|
f6b200
|
742 |
<mx:gcupload
|
bcc137
|
743 |
username="${googlecode.user}"
|
JM |
744 |
password="${googlecode.password}"
|
|
745 |
projectname="gitblit"
|
|
746 |
filename="${project.targetDirectory}/${gbapi.zipfile}"
|
|
747 |
targetFilename="gbapi-${project.version}.zip"
|
|
748 |
summary="Gitblit API Library v${project.version} (JSON RPC library to integrate with your software)" />
|
b774de
|
749 |
|
JM |
750 |
<!-- Upload Gitblit Express for RedHat OpenShift -->
|
bcc137
|
751 |
<mx:gcupload
|
JM |
752 |
username="${googlecode.user}"
|
|
753 |
password="${googlecode.password}"
|
|
754 |
projectname="gitblit"
|
|
755 |
filename="${project.targetDirectory}/${express.zipfile}"
|
|
756 |
targetFilename="express-${project.version}.zip"
|
|
757 |
summary="Gitblit Express v${project.version} (run Gitblit on RedHat's OpenShift cloud)" />
|
b774de
|
758 |
|
5450d0
|
759 |
</target>
|
JM |
760 |
|
b774de
|
761 |
|
85c2e6
|
762 |
<!--
|
JM |
763 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
b774de
|
764 |
Publish site to site hosting service
|
85c2e6
|
765 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
766 |
-->
|
5aec86
|
767 |
<target name="publishSite" depends="clean,buildSite,updateGhPages" description="Publish the Gitblit site to a host" >
|
b774de
|
768 |
|
f6b200
|
769 |
<echo>Uploading Gitblit ${project.version} website</echo>
|
b774de
|
770 |
|
5aec86
|
771 |
<mx:ftp server="${ftp.server}"
|
81f881
|
772 |
userid="${ftp.user}"
|
JM |
773 |
password="${ftp.password}"
|
|
774 |
remotedir="${ftp.dir}"
|
|
775 |
passive="true"
|
|
776 |
verbose="yes">
|
f6b200
|
777 |
<fileset dir="${project.siteTargetDirectory}" />
|
5aec86
|
778 |
</mx:ftp>
|
81f881
|
779 |
</target>
|
85c2e6
|
780 |
|
b774de
|
781 |
|
f6b200
|
782 |
<!--
|
JM |
783 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
784 |
Tag a new version and prepare for the next development cycle.
|
|
785 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
786 |
-->
|
fd9086
|
787 |
<target name="tagRelease" depends="prepare" description="tag a new version and prepare for the next development cycle">
|
f6b200
|
788 |
<!-- release -->
|
JM |
789 |
<property name="dryrun" value="false" />
|
|
790 |
<mx:version stage="release" dryrun="${dryrun}" />
|
5aec86
|
791 |
<property name="project.tag" value="v${project.version}" />
|
f6b200
|
792 |
<!-- commit build.moxie & releases.moxie (automatic) -->
|
JM |
793 |
<mx:commit showtitle="no">
|
|
794 |
<message>Prepare ${project.version} release</message>
|
5aec86
|
795 |
<tag name="${project.tag}">
|
f6b200
|
796 |
<message>${project.name} ${project.version} release</message>
|
JM |
797 |
</tag>
|
|
798 |
</mx:commit>
|
5aec86
|
799 |
|
JM |
800 |
<!-- create the release process script -->
|
|
801 |
<mx:if>
|
|
802 |
<os family="windows" />
|
|
803 |
<then>
|
|
804 |
<!-- Windows PowerShell script -->
|
|
805 |
<!-- set-executionpolicy remotesigned -->
|
|
806 |
<property name="recipe" value="release_${project.version}.ps1" />
|
|
807 |
</then>
|
|
808 |
<else>
|
|
809 |
<!-- Bash script -->
|
|
810 |
<property name="recipe" value="release_${project.version}.sh" />
|
|
811 |
</else>
|
|
812 |
</mx:if>
|
|
813 |
<delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />
|
|
814 |
<!-- Work-around for lack of proper ant property substitution in copy -->
|
|
815 |
<property name="dollar" value="$"/>
|
|
816 |
<copy file="release.template" tofile="${recipe}">
|
|
817 |
<filterset begintoken="${dollar}{" endtoken="}">
|
|
818 |
<filter token="project.version" value="${project.version}" />
|
|
819 |
<filter token="project.commitId" value="${project.commitId}" />
|
|
820 |
<filter token="project.tag" value="${project.tag}" />
|
f12685
|
821 |
<filter token="project.directory" value="${basedir}" />
|
JM |
822 |
<filter token="maven.directory" value="${maven.directory}" />
|
5aec86
|
823 |
</filterset>
|
JM |
824 |
</copy>
|
|
825 |
<chmod file="${recipe}" perm="ugo+rx" />
|
f6b200
|
826 |
|
JM |
827 |
<!-- next cycle -->
|
|
828 |
<mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" />
|
|
829 |
<mx:commit showtitle="no">
|
|
830 |
<message>Reset build identifiers for next development cycle</message>
|
5aec86
|
831 |
</mx:commit>
|
85c2e6
|
832 |
</target>
|
f6b200
|
833 |
|
JM |
834 |
|
|
835 |
<!--
|
|
836 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
837 |
Build Gitblit Docs
|
|
838 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
839 |
-->
|
|
840 |
<macrodef name="generateDocs">
|
|
841 |
<attribute name="toDir"/>
|
|
842 |
<sequential>
|
|
843 |
<mx:doc toDir="@{toDir}" minify="true" customless="custom.less">
|
|
844 |
<structure>
|
|
845 |
<menu name="about">
|
|
846 |
<page name="overview" src="siteindex.mkd" out="index.html" headerLinks="false" />
|
|
847 |
<page name="features" src="features.mkd" />
|
|
848 |
</menu>
|
|
849 |
<menu name="documentation">
|
cc0477
|
850 |
<menu name="Gitblit GO" pager="true" pagerPlacement="bottom" pagerLayout="justified">
|
JM |
851 |
<page name="setup GO" src="setup_go.mkd" />
|
|
852 |
<page name="upgrade GO" src="upgrade_go.mkd" />
|
|
853 |
</menu>
|
|
854 |
<divider />
|
|
855 |
<menu name="Gitblit WAR" pager="true" pagerPlacement="bottom" pagerLayout="justified">
|
|
856 |
<page name="setup WAR" src="setup_war.mkd" />
|
|
857 |
<page name="upgrade WAR" src="upgrade_war.mkd" />
|
|
858 |
</menu>
|
|
859 |
<divider />
|
044549
|
860 |
<menu name="Gitblit Express" pager="true" pagerPlacement="bottom" pagerLayout="justified">
|
JM |
861 |
<page name="setup Express" src="setup_express.mkd" />
|
|
862 |
<page name="upgrade Express" src="upgrade_express.mkd" />
|
|
863 |
</menu>
|
|
864 |
<divider />
|
cc0477
|
865 |
<page name="administration" src="administration.mkd" />
|
JM |
866 |
<page name="authentication" src="setup_authentication.mkd" />
|
|
867 |
<page name="push hooks" src="setup_hooks.mkd" />
|
|
868 |
<page name="lucene indexing" src="setup_lucene.mkd" />
|
|
869 |
<page name="reverse proxies" src="setup_proxy.mkd" />
|
044549
|
870 |
<page name="client app menus" src="setup_clientmenus.mkd" />
|
cc0477
|
871 |
<divider />
|
JM |
872 |
<page name="Gitblit as a viewer" src="setup_viewer.mkd" />
|
|
873 |
<divider />
|
|
874 |
<page name="git client setup" src="setup_client.mkd" />
|
|
875 |
<divider />
|
f6b200
|
876 |
<page name="federation" src="federation.mkd" />
|
JM |
877 |
<divider />
|
|
878 |
<page name="settings" src="properties.mkd" />
|
cc0477
|
879 |
<page name="faq" src="faq.mkd" />
|
f6b200
|
880 |
<divider />
|
JM |
881 |
<page name="design" src="design.mkd" />
|
|
882 |
<page name="rpc" src="rpc.mkd" />
|
|
883 |
</menu>
|
|
884 |
<menu name="changelog">
|
|
885 |
<page name="current release" src="releasecurrent.mkd" />
|
|
886 |
<page name="older releases" src="releasehistory.mkd" />
|
|
887 |
</menu>
|
|
888 |
<menu name="links">
|
724da5
|
889 |
<link name="Gitblit Demo (RELEASE)" src="https://demo-gitblit.rhcloud.com" />
|
JM |
890 |
<link name="Gitbilt Next (SNAPSHOT)" src="https://next-gitblit.rhcloud.com" />
|
f6b200
|
891 |
<divider />
|
JM |
892 |
<link name="Github" src="${project.scmUrl}" />
|
|
893 |
<link name="Issues" src="${project.issuesUrl}" />
|
|
894 |
<link name="Discussion" src="${project.forumUrl}" />
|
|
895 |
<link name="Google+" src="${project.socialNetworkUrl}" />
|
|
896 |
<link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
|
|
897 |
</menu>
|
|
898 |
</structure>
|
|
899 |
|
|
900 |
<properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
|
|
901 |
|
|
902 |
<regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />
|
3daba4
|
903 |
<regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit/gitblit/pull/$3'>pull request #$3</a>" />
|
JM |
904 |
|
f6b200
|
905 |
<!-- Set the logo from the mx:doc resources -->
|
JM |
906 |
<logo file="${project.resources.dir}/gitblt_25_white.png" />
|
|
907 |
<favicon file="${project.resources.dir}/gitblt-favicon.png" />
|
|
908 |
|
|
909 |
<resource>
|
|
910 |
<fileset dir="${project.resources.dir}">
|
|
911 |
<include name="lock_go_16x16.png" />
|
|
912 |
<include name="lock_pull_16x16.png" />
|
|
913 |
<include name="shield_16x16.png" />
|
|
914 |
<include name="cold_16x16.png" />
|
|
915 |
<include name="bug_16x16.png" />
|
|
916 |
<include name="book_16x16.png" />
|
|
917 |
<include name="blank.png" />
|
|
918 |
<include name="federated_16x16.png" />
|
|
919 |
<include name="arrow_page.png" />
|
|
920 |
</fileset>
|
|
921 |
</resource>
|
|
922 |
</mx:doc>
|
|
923 |
</sequential>
|
|
924 |
</macrodef>
|
|
925 |
|
|
926 |
<!--
|
|
927 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
928 |
Macro to create a pristine data directory for the target build
|
|
929 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
930 |
-->
|
|
931 |
<macrodef name="prepareDataDirectory">
|
|
932 |
<attribute name="toDir"/>
|
|
933 |
<sequential>
|
|
934 |
<mkdir dir="@{toDir}" />
|
|
935 |
<copy todir="@{toDir}" overwrite="false">
|
|
936 |
<fileset dir="${project.distrib.dir}/data">
|
|
937 |
<include name="users.conf" />
|
|
938 |
<include name="projects.conf" />
|
4fb6af
|
939 |
<include name="gitblit.properties" />
|
f6b200
|
940 |
</fileset>
|
JM |
941 |
</copy>
|
abab3a
|
942 |
<mkdir dir="@{toDir}/git" />
|
JM |
943 |
<copy todir="@{toDir}/git" overwrite="false">
|
|
944 |
<fileset dir="${project.distrib.dir}/data/git">
|
|
945 |
<include name="project.mkd" />
|
|
946 |
</fileset>
|
|
947 |
</copy>
|
f6b200
|
948 |
<mkdir dir="@{toDir}/groovy" />
|
JM |
949 |
<copy todir="@{toDir}/groovy">
|
|
950 |
<fileset dir="${project.distrib.dir}/data/groovy">
|
|
951 |
<include name="sendmail.groovy" />
|
|
952 |
<include name="sendmail-html.groovy" />
|
|
953 |
<include name="jenkins.groovy" />
|
|
954 |
<include name="protect-refs.groovy" />
|
7847af
|
955 |
<include name="blockpush.groovy" />
|
JM |
956 |
<include name="localclone.groovy" />
|
f6b200
|
957 |
<include name="fogbugz.groovy" />
|
JM |
958 |
<include name="thebuggenie.groovy" />
|
|
959 |
</fileset>
|
|
960 |
</copy>
|
|
961 |
</sequential>
|
|
962 |
</macrodef>
|
|
963 |
|
|
964 |
<!--
|
|
965 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
966 |
Macro to upload binaries to GoogleCode
|
|
967 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
968 |
-->
|
|
969 |
<macrodef name="googleUpload">
|
|
970 |
<attribute name="sourceFile"/>
|
|
971 |
<attribute name="targetFile"/>
|
|
972 |
<attribute name="description"/>
|
|
973 |
<sequential>
|
|
974 |
<gcupload
|
|
975 |
username="${googlecode.user}"
|
|
976 |
password="${googlecode.password}"
|
|
977 |
projectname="gitblit"
|
|
978 |
filename="${project.targetDirectory}/@{sourceFile}"
|
|
979 |
targetfilename="@{targetFile}"
|
|
980 |
summary="@{description}"
|
|
981 |
labels="Featured, Type-Package, OpSys-All" />
|
|
982 |
</sequential>
|
|
983 |
</macrodef>
|
|
984 |
|
|
985 |
|
|
986 |
<!--
|
|
987 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
988 |
Install Gitblit JAR for usage as Maven module
|
|
989 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
990 |
-->
|
|
991 |
<target name="installMaven" depends="compile" description="Install Gitblit JAR as Maven module">
|
|
992 |
<local name="project.jar" />
|
|
993 |
<property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
|
358545
|
994 |
<property name="resourceFolderPrefix" value="" />
|
JM |
995 |
<mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
|
f6b200
|
996 |
|
JM |
997 |
<exec executable="mvn">
|
|
998 |
<arg value="install:install-file" />
|
|
999 |
<arg value="-Dfile=${project.jar}" />
|
|
1000 |
<arg value="-DpomFile=${basedir}/pom.xml" />
|
|
1001 |
<arg value="-DcreateChecksum=true" />
|
|
1002 |
</exec>
|
|
1003 |
</target>
|
|
1004 |
|
|
1005 |
<!--
|
|
1006 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
1007 |
Upload Gitblit JAR to remote Maven repository
|
|
1008 |
|
|
1009 |
build.properties:
|
|
1010 |
project.maven.repo.url = http://whatever.com/maven2
|
|
1011 |
project.maven.repo.id = whateverId
|
|
1012 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
1013 |
-->
|
|
1014 |
<target name="uploadMaven" depends="compile" description="Upload Gitblit JAR to remote Maven repository">
|
|
1015 |
<local name="project.jar" />
|
|
1016 |
<property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
|
|
1017 |
<mx:jar destfile="${project.jar}" includeresources="true" />
|
|
1018 |
|
|
1019 |
<exec executable="mvn">
|
|
1020 |
<arg value="deploy:deploy-file" />
|
|
1021 |
<arg value="-Dfile=${project.jar}" />
|
|
1022 |
<arg value="-DpomFile=${basedir}/pom.xml" />
|
|
1023 |
<arg value="-Durl=${project.maven.repo.url}" />
|
|
1024 |
<arg value="-DrepositoryId=${project.maven.repo.id}" />
|
|
1025 |
<arg value="-DcreateChecksum=true" />
|
|
1026 |
</exec>
|
289efb
|
1027 |
</target>
|
JM |
1028 |
|
764d94
|
1029 |
</project>
|