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