Ignore:
Timestamp:
2010-01-27T08:59:34+13:00 (14 years ago)
Author:
oranfry
Message:

tidied up the source code release-kits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/release-kits/kits/sork2/ant-scripts/build.xml

    r21649 r21650  
    1010<project name="sork2-build" default="sork2">
    1111
    12     <!-- CONSTANTS -->
    13 
    14     <!-- for the benefit of the shared scripts, set release-kit home -->
    15     <property name="rk.name" value="sork2"/>
    16     <property name="rk.home" value="${sork2.home}" />
    17     <property name="rk.os" value="multi" />
    18     <property name="os.suffix" value="AnyPlatform"/>
    19    
    2012    <!-- IMPORT OTHER ANT SCRIPTS -->
    2113    <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
    2214    <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
    23     <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/>
    2415
    2516    <!-- THE MAIN TARGET -->
    2617    <target name="sork2" depends="init">
    27         <antcall target="export-gsdl-gli"><param name="dest" value="distributions/Greenstone-${version}-source-distribution"/></antcall>
    28         <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/Greenstone-${version}-source-distribution"/></antcall>
    29         <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/Greenstone-${version}-source-distribution/gli"/></antcall>
    30         <antcall target="insert-winbin"/>
    31         <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/Greenstone-${version}-source-distribution/bin/windows"/></antcall>
    32         <antcall target="tweak-files" />
    33         <antcall target="create-archives"/>
    34         <antcall target="create-sourcecode"/>
    35     </target>
    3618
    37     <target name="properties">
    38         <echo>Required Properties:</echo>
    39         <echo>version             the version string for the release</echo>
    40         <echo/>
     19        <!-- store the name of the distribution -->
     20        <property name="dist.name" value="${dist.name}"/>
    4121
    42         <echo>Optional Properties:</echo>
    43         <echo>branch.path         the branch of gsdl to make a release of. Eg: tags/2.81. Default: trunk.</echo>
    44         <echo>branch.revision     the revision of gsdl to make a release of. Eg: 18273. Default: HEAD.</echo>
    45         <echo/>
    46     </target>
     22        <!-- create distributions dir -->
     23        <mkdir dir="distributions"/>
    4724
     25        <!-- export greenstone2 and gli -->
     26        <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/greenstone2"/><arg value="distributions/${dist.name}"/></exec>
     27        <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/gli"/><arg value="distributions/${dist.name}/gli"/></exec>
    4828
    49     <target name="tweak-files">
    50         <delete file="distributions/Greenstone-${version}-source-distribution/bin/linux/mgquery_old" />
    51     </target>
     29        <!-- set version numbers -->
     30        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/${dist.name}"/></antcall>
     31        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.name}/gli"/></antcall>
    5232
    53     <target name="insert-winbin">
    54         <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows"/>
     33        <!-- insert windows binaries -->
     34        <delete dir="distributions/${dist.name}/bin/windows"/>
    5535        <exec executable="svn">
    5636            <arg value="export"/>
    5737            <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
    58             <arg value="distributions/Greenstone-${version}-source-distribution/bin/windows"/>
     38            <arg value="distributions/${dist.name}/bin/windows"/>
    5939        </exec>
    60         <get src="${server.exe.location}" dest="distributions/Greenstone-${version}-source-distribution/bin/windows/server.exe"/>
    61        
    62         <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows/imagemagick"/>
    63         <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows/ghostscript"/>
    64     </target>
     40        <get src="${server.exe.location}" dest="distributions/${dist.name}/bin/windows/server.exe"/>
     41        <delete dir="distributions/${dist.name}/bin/windows/imagemagick"/>
     42        <delete dir="distributions/${dist.name}/bin/windows/ghostscript"/>
    6543
    66     <target name="create-archives">
     44        <!-- insert windows perl -->
     45        <unzip src="${rk.home}/shared/windows/perl.zip" dest="distributions/${dist.name}/bin/windows"/>
     46
     47        <!-- clean up -->
     48        <delete file="distributions/${dist.name}/bin/linux/mgquery_old" />
     49
     50        <!-- create the archives (source code distribution) -->
    6751        <mkdir dir="products"/>
    68         <delete file="products/Greenstone-${version}-source-distribution.zip"/>
    69         <zip destfile="products/Greenstone-${version}-source-distribution.zip"  basedir="distributions" includes="Greenstone-${version}-source-distribution/**/*"/>
     52        <delete file="products/${dist.name}.zip"/>
     53        <zip destfile="products/${dist.name}.zip"  basedir="distributions" includes="${dist.name}/**/*"/>
    7054        <exec dir="distributions" executable="tar">
    71             <arg line="-czf ../products/Greenstone-${version}-source-distribution.tar.gz Greenstone-${version}-source-distribution"/>
     55            <arg line="-czf ../products/${dist.name}.tar.gz ${dist.name}"/>
    7256        </exec>
    73     </target>
    7457
    75     <target name="create-sourcecode">
     58        <!-- CREATE THE SOURCE CODE COMPONENT (SOURCE CODE TOP-UP TO THE BINARY RELEASE) -->
     59
    7660        <!-- create a directory for the sourcecode -->
    7761        <mkdir dir="distributions/source-component"/>
    7862
    7963        <!-- copy the files in -->
    80         <exec dir="distributions/Greenstone-${version}-source-distribution" executable="cp">
     64        <exec dir="distributions/${dist.name}" executable="cp">
    8165            <arg value="-r"/>
    8266
     
    136120            <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
    137121        </exec>
     122
    138123    </target>
    139124
    140     <target name="export-gsdl-gli">
    141         <delete dir="${dest}"/>
    142         <exec executable="svn">
    143             <arg value="export"/>
    144             <arg value="${svn.root}/main/${branch.path}/greenstone2"/>
    145             <arg value="${dest}"/>
    146         </exec>
    147         <exec executable="svn">
    148             <arg value="export"/>
    149             <arg value="${svn.root}/main/${branch.path}/gli"/>
    150             <arg value="${dest}/gli"/>
    151         </exec>
    152     </target>
    153 
     125    <target name="properties" depends="core-properties"/>
    154126
    155127</project>
Note: See TracChangeset for help on using the changeset viewer.