Changeset 290

Show
Ignore:
Timestamp:
02/02/2007 08:17:51 PM
Author:
toby
Message:

Only build nightly if updates exist since last build

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • build

    • Property svn:ignore changed from user.default.build to user.default.build latestrev.txt
  • build/default.build

    r289 r290  
    55    <!--   GLOBAL PROPERTIES AND DEFAULTS                                   --> 
    66    <!--====================================================================--> 
    7      
     7 
    88    <property name="ssphys_url" value="http://www.pumacode.org/download/vss2svn/ssphys/ssphys-latest.zip" /> 
    99    <property name="vss2svn_perlapp" value="trunk\script\build-vss2svn.perlapp" /> 
     
    1111    <tstamp property="build_date" pattern="yyyyMMdd" verbose="true" /> 
    1212    <property name="build_dir" value="${cwd}\build-${build_date}" /> 
    13     <property name="zipfile" value="${build_dir}/vss2svn-nightly-${build_date}.zip" /> 
     13    <property name="zip_file" value="${build_dir}/vss2svn-nightly-${build_date}.zip" /> 
     14    <property name="rev_file" value="${cwd}/latestrev.txt" /> 
    1415    <property name="sweep_dir" value="${cwd}" /> 
    15      
     16    <property name="new_build" value="false" /> 
     17    <property name="old_rev" value="0" /> 
     18 
    1619    <include buildfile="user.default.build" failonerror="false" /> 
    1720 
     
    1922    <!--   ACTION TARGETS                                                   --> 
    2023    <!--====================================================================--> 
    21      
     24 
    2225    <target name="all" depends="build,deploy,clean" /> 
    23      
     26 
    2427    <target name="build" description="Build vss2svn.exe and download latest ssphys.zip"> 
    2528        <delete dir="${build_dir}" /> 
    2629        <mkdir dir="${build_dir}" /> 
    27          
     30 
    2831        <echo message="" /> 
    2932        <echo message="Performing svn update of trunk..." /> 
     
    3538            <arg value="trunk" /> 
    3639        </exec> 
    37          
     40 
     41        <loadfile file="${rev_file}" property="old_rev" if="${file::exists(rev_file)}" /> 
     42 
    3843        <echo message="" /> 
    39         <echo message="Generating vss2svn.exe from script..." /> 
     44        <echo message="Checking trunk version..." /> 
    4045        <echo message="" /> 
    4146 
    42         <exec program="perlapp" workingdir="${cwd}"> 
    43             <arg value="--exe" /> 
    44             <arg value="${build_dir}\vss2svn.exe" /> 
    45             <arg value="${vss2svn_perlapp}" /> 
     47        <exec program="svnversion" output="${rev_file}" workingdir="${cwd}"> 
     48            <arg value="trunk" /> 
     49            <arg value="--no-newline" /> 
    4650        </exec> 
    47          
    48         <get src="${ssphys_url}" dest="${build_dir}\ssphys.zip" /> 
    49         <unzip zipfile="${build_dir}\ssphys.zip" todir="${build_dir}" /> 
    5051 
    51         <zip zipfile="${zipfile}"> 
    52             <fileset basedir="${build_dir}"> 
    53                 <include name="**/*.exe" /> 
    54             </fileset> 
    55         </zip> 
    56          
     52        <loadfile file="${rev_file}" property="new_rev" /> 
     53 
     54        <if test="${new_rev > old_rev}"> 
     55            <echo message="" /> 
     56            <echo message="Generating vss2svn.exe from script..." /> 
     57            <echo message="" /> 
     58 
     59            <exec program="perlapp" workingdir="${cwd}"> 
     60                <arg value="--exe" /> 
     61                <arg value="${build_dir}\vss2svn.exe" /> 
     62                <arg value="${vss2svn_perlapp}" /> 
     63            </exec> 
     64 
     65            <get src="${ssphys_url}" dest="${build_dir}\ssphys.zip" /> 
     66            <unzip zipfile="${build_dir}\ssphys.zip" todir="${build_dir}" /> 
     67 
     68            <zip zipfile="${zip_file}"> 
     69                <fileset basedir="${build_dir}"> 
     70                    <include name="**/*.exe" /> 
     71                </fileset> 
     72            </zip> 
     73 
     74            <property name="new_build" value="true" /> 
     75        </if> 
     76 
    5777        <echo message="" /> 
    58         <echo message="Build finished." /> 
     78        <echo message="No updates since last build" unless="${new_build}" /> 
     79        <echo message="Build finished." if="${new_build}" /> 
    5980        <echo message="" /> 
    6081    </target> 
    61      
    62     <target name="deploy" description="Copy generated zipfile to sweep folder"> 
    63         <copy file="${zipfile}" todir="${sweep_dir}" /> 
     82 
     83    <target name="deploy" description="Copy generated zipfile to sweep folder" 
     84        if="${new_build}"> 
     85 
     86        <copy file="${zip_file}" todir="${sweep_dir}" /> 
    6487 
    6588        <echo message="" /> 
     
    6790        <echo message="" /> 
    6891    </target> 
    69      
     92 
    7093    <target name="clean" description="Remove build directory"> 
    7194        <delete dir="${build_dir}" /> 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.