root/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml @ 18003

Revision 18003, 3.3 KB (checked in by oranfry, 11 years ago)

standardised the create-binary-zip methods

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3        ..........................................................
4        August 2008
5        Targets for Greenstone2 release kits
6        Oran Fry
7        ..........................................................
8-->
9
10<project name="rk2-targets">
11
12    <property name="version.major" value="2"/>
13
14    <target name="export-gsdl-gli">
15        <delete dir="${dest}"/>
16        <svn>
17            <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="${dest}"/>
18            <export srcurl="${svn.root}/gli/${branch.path}" destPath="${dest}/gli"/>
19        </svn>
20    </target>
21
22    <target name="gsdl-set-version-numbers">
23        <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
24        <rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
25
26        <echo level="info">Setting version in Install.sh</echo>
27        <rsr file="${gsdl.basedir}/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
28
29        <echo level="info">Setting version in etc/VERSION</echo>
30        <rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
31    </target>
32
33    <target name="insert-export-to-cd-package">
34        <mkdir dir="${gsdl.basedir}/bin/windows"/>
35        <get src="http://greenstone.org/release-snapshots/server.exe" dest="${gsdl.basedir}/bin/windows/server.exe"/>
36        <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
37        <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
38    </target>
39
40    <target name="create-binary-zip-linux">
41        <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
42        <exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec>
43        <exec dir="${basedir}" executable="cp"><arg line="${binzip.dir}/bin/linux/library distributions/Greenstone-${version}-${os.suffix}-binary/cgi-bin"/></exec>
44        <exec dir="${basedir}" executable="cp"><arg line="${binzip.dir}/bin/linux/oaiserver distributions/Greenstone-${version}-${os.suffix}-binary/cgi-bin"/></exec>
45
46        <!-- delete sourcecode -->
47        <delete dir="${binzip.dir}/common-src"/>
48        <delete dir="${binzip.dir}/build-src"/>
49        <delete dir="${binzip.dir}/runtime-src"/>
50
51        <!-- delete loose files -->
52        <delete>
53            <fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.sh,uninst.jar" excludes="READMEen.txt"/>
54        </delete>
55
56    </target>
57
58    <target name="create-binary-zip-windows">
59        <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
60        <copy todir="${binzip.dir}">
61            <fileset dir="distributions/web"/>
62        </copy>
63        <copy todir="${binzip.dir}/cgi-bin">
64            <fileset dir="${binzip.dir}/bin/${shell.os}">
65                <includes name="library.exe,oaiservr.exe"/>
66            </fileset>
67        </copy>
68        <delete>
69            <fileset dir="${binzip.dir}">
70                <include name="common-src/**/*"/>
71                <include name="common-src"/>
72                <include name="build-src/**/*"/>
73                <include name="build-src"/>
74                <include name="runtime-src/**/*"/>
75                <include name="runtime-src"/>
76                <include name="README*.txt"/>
77                <exclude name="READMEen.txt"/>
78                <include name="Uninstaller.bat"/>
79                <include name="uninst.bat"/>
80                <include name="uninst.jar"/>
81            </fileset>
82        </delete>
83    </target>
84
85</project>
Note: See TracBrowser for help on using the browser.