source: release-kits/lirk2/ant-scripts/create-distribution.xml@ 15957

Last change on this file since 15957 was 15957, checked in by oranfry, 13 years ago

added a resources directory to hold resources for gsdl releases, to be used instead of for-distributions

File size: 3.4 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2
3<!--
4 ..........................................................
5 September 2007
6 Greenstone3 'release maker' script
7 Oran Fry
8 ..........................................................
9-->
10
11<project name="lirk2-create-distribution" default="create-distribution">
12
13
14 <target name="create-distribution">
15 <addressedcall target="export-gsdl-gli-indexers" />
16 <addressedcall target="dist-set-version" />
17 <addressedcall target="compile-gli" />
18 <addressedcall target="create-gli-client-zip" />
19 <addressedcall target="tweak-files" />
20 </target>
21
22 <target name="export-gsdl-gli-indexers">
23 <if><bool><istrue value="${execute}"/></bool>
24
25 <mkdir dir="distribution"/>
26 <delete dir="distribution/gsdl"/>
27 <svn>
28 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distribution/gsdl"/>
29 </svn>
30
31 <svn>
32 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/gsdl/gli"/>
33 </svn>
34
35 <svn>
36 <export srcurl="${svn.root}/indexers/${branch.path}" destPath="distribution/gsdl/indexers"/>
37 </svn>
38
39 </if>
40 </target>
41
42 <target name="dist-set-version">
43 <if><bool><istrue value="${execute}"/></bool>
44
45 <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
46 <rsr file="${basedir}/gsdl/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
47
48 <echo level="info">Setting version in Install.sh</echo>
49 <rsr file="${basedir}/gsdl/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
50
51 <echo level="info">Setting version in etc/VERSION</echo>
52 <rsr file="${basedir}/gsdl/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
53
54 </if>
55 </target>
56
57 <target name="compile-gli">
58 <if><bool><istrue value="${execute}"/></bool>
59
60 <echo>Compiling gli...</echo>
61 <exec dir="${basedir}/distribution/gsdl/gli" executable="${basedir}/distribution/gsdl/gli/makegli.sh"/>
62
63 <echo>Creating jar...</echo>
64 <exec dir="${basedir}/distribution/gsdl/gli" executable="${basedir}/distribution/gsdl/gli/makejar.sh"/>
65
66 <echo>Cleaning up intermediate files...</echo>
67 <delete dir="${basedir}/distribution/gsdl/gli/jar"/>
68 <delete dir="${basedir}/distribution/gsdl/gli/classes/org"/>
69
70 <echo>Putting gli server jar in a better place</echo>
71 <exec dir="${basedir}/distribution/gsdl" executable="mv" failonerror="true">
72 <arg line="gli/GLIServer.jar bin/java" />
73 </exec>
74
75 </if>
76 </target>
77
78 <target name="create-gli-client-zip">
79 <if><bool><istrue value="${execute}"/></bool>
80 <!--
81 # take a copy of GLI directory
82 &util::cp_r(&util::filename_cat($tmpdir, "gsdl", "gli"), $tmpdir);
83
84 my $client_dirname = "gli-client-" . $version_num;
85 rename ("gli", $client_dirname);
86 chdir(&util::filename_cat($tmpdir, $client_dirname));
87
88
89 # delete unnecessary stuff
90 `rm -rf clean.* document.* gems.* gli*.sh gli*.bat make*.sh make*.bat lib src`;
91 # make sure permissions are ok
92 `chmod a+x client-gli.sh client-gli.bat`;
93 chdir($tmpdir);
94
95 # zip up the client
96 &zip($client_dirname, $client_dirname, $tmpdir, 1);
97 -->
98 </if>
99 </target>
100
101
102 <target name="tweak-files">
103 <if><bool><istrue value="${execute}"/></bool>
104
105 <echo level="info">Changing Install.sh to web release</echo>
106 <rsr file="${basedir}/distribution/gsdl/Install.sh" pattern="^(iscdrom=).*" replacement="$1&quot;no&quot;" />
107
108 </if>
109 </target>
110
111
112
113
114
115</project>
Note: See TracBrowser for help on using the repository browser.