Changeset 15956 for release-kits/lirk2/ant-scripts/create-distribution.xml
- Timestamp:
- 2008-06-11T15:25:31+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/lirk2/ant-scripts/create-distribution.xml
r14982 r15956 9 9 --> 10 10 11 <project name="lirk 3-create-distribution" default="create-distribution">11 <project name="lirk2-create-distribution" default="create-distribution"> 12 12 13 13 14 14 <target name="create-distribution"> 15 <!-- create distribution --> 16 <addressedcall target="export-greenstone3" /> 17 <addressedcall target="dist-set-version-number-property" /> 18 <addressedcall target="create-distributions-1" /> 19 <addressedcall target="create-distributions-2" /> 20 <addressedcall target="create-distributions-3" /> 21 <addressedcall target="copy-over-build-xml" /> 22 <addressedcall target="insert-user-manual"/> 23 <addressedcall target="insert-compiled-binaries"/> 24 </target> 25 26 27 28 <!-- 29 30 second level targets 31 32 --> 33 34 <target name="export-greenstone3"> 35 <if><bool><istrue value="${execute}"/></bool> 36 <mkdir dir="distribution"/> 37 <delete dir="distribution/greenstone3"/> 38 <svn> 39 <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3"/> 40 </svn> 15 <if><bool><istrue value="${execute}" /></bool> 16 <addressedcall target="export-gsdl-gli-indexers" /> 17 <addressedcall target="dist-set-version" /> 18 <addressedcall target="compile-gli" /> 19 <addressedcall target="create-gli-client-zip" /> 20 <addressedcall target="tweak-files" /> 41 21 </if> 42 22 </target> 43 23 44 <target name=" dist-set-version-number-property">24 <target name="export-gsdl-gli-indexers"> 45 25 <if><bool><istrue value="${execute}"/></bool> 46 <rsr file="distribution/greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 26 27 <mkdir dir="distribution"/> 28 <delete dir="distribution/gsdl"/> 29 <svn> 30 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distribution/gsdl"/> 31 </svn> 32 33 <svn> 34 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/gsdl/gli"/> 35 </svn> 36 37 <svn> 38 <export srcurl="${svn.root}/indexers/${branch.path}" destPath="distribution/gsdl/indexers"/> 39 </svn> 40 47 41 </if> 48 42 </target> 49 43 50 <target name=" create-distributions-1">44 <target name="dist-set-version"> 51 45 <if><bool><istrue value="${execute}"/></bool> 52 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-1" inheritAll="false"> 53 <property name="app.version" value="${version}"/> 54 <property name="branch.path" value="${branch.path}"/> 55 </ant> 46 47 <echo level="info">Setting version in src/lib/gsdlconf.h</echo> 48 <rsr file="${basedir}/gsdl/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" /> 49 50 <echo level="info">Setting version in Install.sh</echo> 51 <rsr file="${basedir}/gsdl/Install.sh" pattern="(echo "Version: ).*(" .*)" replacement="$1${version}$2" /> 52 53 <echo level="info">Setting version in etc/VERSION</echo> 54 <rsr file="${basedir}/gsdl/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" /> 55 56 56 </if> 57 57 </target> 58 58 59 <target name="c reate-distributions-2">59 <target name="compile-gli"> 60 60 <if><bool><istrue value="${execute}"/></bool> 61 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-2" inheritAll="false"> 62 <property name="app.version" value="${version}"/> 63 <property name="branch.path" value="${branch.path}"/> 64 </ant> 61 62 <echo>Compiling gli...</echo> 63 <exec dir="${basedir}/distribution/gsdl/gli" executable="${basedir}/distribution/gsdl/gli/makegli.sh"/> 64 65 <echo>Creating jar...</echo> 66 <exec dir="${basedir}/distribution/gsdl/gli" executable="${basedir}/distribution/gsdl/gli/makejar.sh"/> 67 68 <echo>Cleaning up intermediate files...</echo> 69 <delete dir="${basedir}/distribution/gsdl/gli/jar"/> 70 <delete dir="${basedir}/distribution/gsdl/gli/classes/org"/> 71 72 <echo>Putting gli server jar in a better place</echo> 73 <exec dir="${basedir}/distribution/gsdl" executable="mv" failonerror="true"> 74 <arg line="gli/GLIServer.jar bin/java" /> 75 </exec> 76 65 77 </if> 66 78 </target> 67 79 68 <target name="create- distributions-3">80 <target name="create-gli-client-zip"> 69 81 <if><bool><istrue value="${execute}"/></bool> 70 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-3" inheritall="false"> 71 <property name="app.version" value="${version}"/> 72 <property name="branch.path" value="${branch.path}"/> 73 </ant> 74 </if> 75 </target> 82 <!-- 83 # take a copy of GLI directory 84 &util::cp_r(&util::filename_cat($tmpdir, "gsdl", "gli"), $tmpdir); 76 85 77 <target name="copy-over-build-xml"> 78 <if><bool><istrue value="${execute}"/></bool> 79 <move file="distribution/greenstone3/modified-build.xml" tofile="distribution/greenstone3/build.xml"/> 80 </if> 81 </target> 86 my $client_dirname = "gli-client-" . $version_num; 87 rename ("gli", $client_dirname); 88 chdir(&util::filename_cat($tmpdir, $client_dirname)); 82 89 83 <target name="insert-user-manual">84 <if><bool><istrue value="${execute}"/></bool>85 <copy file="greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distribution/greenstone3/docs/manual/gs2_user_en.pdf"/>86 </if>87 </target>88 90 89 <target name="insert-compiled-binaries"> 90 <if><bool><istrue value="${execute}"/></bool> 91 # delete unnecessary stuff 92 `rm -rf clean.* document.* gems.* gli*.sh gli*.bat make*.sh make*.bat lib src`; 93 # make sure permissions are ok 94 `chmod a+x client-gli.sh client-gli.bat`; 95 chdir($tmpdir); 91 96 92 <delete dir="distribution/greenstone3/lib/jni"/> 93 <exec executable="cp"><arg line="-r greenstone3/lib/jni distribution/greenstone3/lib"/></exec> 94 95 <delete dir="distribution/greenstone3/gs2build/bin/linux"/> 96 <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/linux distribution/greenstone3/gs2build/bin"/></exec> 97 98 <delete dir="distribution/greenstone3/gs2build/bin/java"/> 99 <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/java distribution/greenstone3/gs2build/bin"/></exec> 97 # zip up the client 98 &zip($client_dirname, $client_dirname, $tmpdir, 1); 99 --> 100 100 </if> 101 101 </target> 102 102 103 103 104 <target name="tweak-files"> 105 <if><bool><istrue value="${execute}"/></bool> 106 107 <echo level="info">Changing Install.sh to web release</echo> 108 <rsr file="${basedir}/distribution/gsdl/Install.sh" pattern="^(iscdrom=).*" replacement="$1"no"" /> 109 110 </if> 111 </target> 112 113 114 104 115 105 116
Note:
See TracChangeset
for help on using the changeset viewer.