common/build.finalize.xml
author Simon Howkins <simonh@symbian.org>
Fri, 01 Oct 2010 16:54:01 +0100
changeset 1276 fdcfee9c5b0d
parent 1250 cf7f8806ba43
permissions -rw-r--r--
Bug 3748: Please separate ROM images into a separate zip file \epoc32\rom\* and \epoc32\rombuild\* now in separate archive (apart from items which are included in the tools zip)

<?xml version="1.0" encoding="UTF-8"?>
<project name="SF-FINALIZE" xmlns:hlm="http://www.nokia.com/helium">
  
  <!-- Transform BRAG xslt and display status at the end of the build -->
  <target name="sf-finalize">
    <delete dir="${build.drive}/output/logs/summary/">
      <include name="**/*.html"/>
    </delete>
    <available property="sf-summary-dir-available" file="${build.drive}/output/logs/summary" type="dir"/>
    <if><isset property="sf-summary-dir-available"/>
      <then>
        <xslt basedir="${build.drive}/output/logs/summary" destdir="${temp.build.dir}" extension=".html" style="brag.xsl"/>    
        <loadfile srcFile="${temp.build.dir}/_BRAG.html" property="sf.brag.status">
          <filterchain>
            <linecontainsregexp>
             <regexp pattern="(BLACK|RED|AMBER|GREEN)"/>
            </linecontainsregexp>
            <trim/>
            <striplinebreaks/>
            <deletecharacters chars="\&gt;\&lt;\h2\h1\/"/>
          </filterchain>
        </loadfile>
      </then>
      <else>
        <property name="sf.brag.status" value="BLACK"/>
      </else>
    </if>
    <echo message="BRAG STATUS: [${sf.brag.status}] - full build details available at ${build.drive}\output\logs\summary\_BRAG.xml"/>
    
    <!-- record brag information in BIT file -->
    <echo message="build_brag&#x0009;${sf.brag.status}${line.separator}" file="${build.log.dir}/bitinfo.txt" append="true"/>
    
    <!-- record build finished time in BIT file -->
    <tstamp>
      <format property="sf.build.finishedtime" pattern="yyyy-MM-dd HH:mm:ss" locale="en,UK"/>
    </tstamp>
    <echo message="finished&#x0009;${sf.build.finishedtime}${line.separator}" file="${build.log.dir}/bitinfo.txt" append="true"/>
    
    <!-- upload BIT info to database -->
    <if><istrue value="${sf.spec.publish.enable}"/><then>
      <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="false">
        <arg value="bitops.pl"/>
        <arg value="-c"/>
        <arg value="-f"/>
        <arg value="${build.log.dir}/bitinfo.txt"/>
      </exec>
    </then></if>
  </target>
	
</project>