Add sf-zip-logs target to be run before sf-postbuild. Packages logs in zipfile for easy transfer.
authorShabeR@UK-SHABER
Tue, 07 Apr 2009 16:23:11 +0100
changeset 37 00208f982d58
parent 36 af82fccdcb75
child 38 c7be4c65f97e
Add sf-zip-logs target to be run before sf-postbuild. Packages logs in zipfile for easy transfer.
common/build.xml
--- a/common/build.xml	Tue Apr 07 14:19:51 2009 +0100
+++ b/common/build.xml	Tue Apr 07 16:23:11 2009 +0100
@@ -94,7 +94,7 @@
         </if>     
     </target>
     
-  <target name="sf-postbuild">
+  <target name="sf-postbuild" depends="sf-zip-logs">
     <echo>[SF-POSTBUILD]</echo>
     <runtarget target="publish"/>
     <if>
@@ -106,6 +106,15 @@
     </if>
   </target>
     
+		
+    <!-- package all logs into zipfile before publish -->
+    <target name="sf-zip-logs">
+        <property name="temp.log.zip" value="${env.TEMP}/build_logs_${sf.spec.job.name}_${build.number}.zip"/>
+        <zip destfile="${temp.log.zip}" basedir="${build.log.dir}"/>
+        <move file="${temp.log.zip}" todir="${build.log.dir}" failonerror="false"/>		
+    </target>
+	
+	
     <target name="sf-build-noprep" depends="sf-compile">
         <echo>[SF-BUILD-NOPREP]</echo>
     </target>
@@ -146,6 +155,7 @@
         <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
     </target>
 
+
 </project>