[14982] | 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 |
|
---|
[15956] | 11 | <project name="lirk2-create-distribution" default="create-distribution">
|
---|
[14982] | 12 |
|
---|
| 13 |
|
---|
| 14 | <target name="create-distribution">
|
---|
[15957] | 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" />
|
---|
[14982] | 20 | </target>
|
---|
| 21 |
|
---|
[15956] | 22 | <target name="export-gsdl-gli-indexers">
|
---|
| 23 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[14982] | 24 |
|
---|
[15956] | 25 | <mkdir dir="distribution"/>
|
---|
| 26 | <delete dir="distribution/gsdl"/>
|
---|
| 27 | <svn>
|
---|
| 28 | <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distribution/gsdl"/>
|
---|
| 29 | </svn>
|
---|
[14982] | 30 |
|
---|
[15956] | 31 | <svn>
|
---|
| 32 | <export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/gsdl/gli"/>
|
---|
| 33 | </svn>
|
---|
[14982] | 34 |
|
---|
| 35 | <svn>
|
---|
[15956] | 36 | <export srcurl="${svn.root}/indexers/${branch.path}" destPath="distribution/gsdl/indexers"/>
|
---|
[14982] | 37 | </svn>
|
---|
[15956] | 38 |
|
---|
[14982] | 39 | </if>
|
---|
| 40 | </target>
|
---|
| 41 |
|
---|
[15956] | 42 | <target name="dist-set-version">
|
---|
[14982] | 43 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 44 |
|
---|
[15956] | 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) ".*"" replacement="$1 "${version}"" />
|
---|
| 47 |
|
---|
| 48 | <echo level="info">Setting version in Install.sh</echo>
|
---|
| 49 | <rsr file="${basedir}/gsdl/Install.sh" pattern="(echo "Version: ).*(" .*)" 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 |
|
---|
[14982] | 54 | </if>
|
---|
| 55 | </target>
|
---|
| 56 |
|
---|
[15956] | 57 | <target name="compile-gli">
|
---|
[14982] | 58 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 59 |
|
---|
[15956] | 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 |
|
---|
[14982] | 75 | </if>
|
---|
| 76 | </target>
|
---|
| 77 |
|
---|
[15956] | 78 | <target name="create-gli-client-zip">
|
---|
[14982] | 79 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[15956] | 80 | <!--
|
---|
| 81 | # take a copy of GLI directory
|
---|
| 82 | &util::cp_r(&util::filename_cat($tmpdir, "gsdl", "gli"), $tmpdir);
|
---|
[14982] | 83 |
|
---|
[15956] | 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 | -->
|
---|
[14982] | 98 | </if>
|
---|
| 99 | </target>
|
---|
| 100 |
|
---|
[15956] | 101 |
|
---|
| 102 | <target name="tweak-files">
|
---|
[14982] | 103 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 104 |
|
---|
[15956] | 105 | <echo level="info">Changing Install.sh to web release</echo>
|
---|
| 106 | <rsr file="${basedir}/distribution/gsdl/Install.sh" pattern="^(iscdrom=).*" replacement="$1"no"" />
|
---|
[14982] | 107 |
|
---|
| 108 | </if>
|
---|
| 109 | </target>
|
---|
| 110 |
|
---|
[15956] | 111 |
|
---|
[14982] | 112 |
|
---|
| 113 |
|
---|
| 114 |
|
---|
| 115 | </project>
|
---|