common/build.finalize.xml
changeset 1249 96548ab09767
child 1250 cf7f8806ba43
equal deleted inserted replaced
1247:311e0398c886 1249:96548ab09767
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="SF-FINALIZE" xmlns:hlm="http://www.nokia.com/helium">
       
     3   
       
     4   <!-- Transform BRAG xslt and display status at the end of the build -->
       
     5   <target name="sf-finalize">
       
     6     <delete dir="${build.drive}/output/logs/summary/">
       
     7       <include name="**/*.html"/>
       
     8     </delete>
       
     9     <available property="sf-summary-dir-available" file="${build.drive}/output/logs/summary" type="dir"/>
       
    10     <if><isset property="sf-summary-dir-available"/>
       
    11       <then>
       
    12         <xslt basedir="${build.drive}/output/logs/summary" destdir="${temp.build.dir}" extension=".html" style="brag.xsl"/>    
       
    13         <loadfile srcFile="${temp.build.dir}/_BRAG.html" property="sf.brag.status">
       
    14           <filterchain>
       
    15             <linecontainsregexp>
       
    16              <regexp pattern="(BLACK|RED|AMBER|GREEN)"/>
       
    17             </linecontainsregexp>
       
    18             <trim/>
       
    19             <striplinebreaks/>
       
    20             <deletecharacters chars="\&gt;\&lt;\h2\h1\/"/>
       
    21           </filterchain>
       
    22         </loadfile>
       
    23       </then>
       
    24       <else>
       
    25         <property name="sf.brag.status" value="BLACK"/>
       
    26       </else>
       
    27     </if>
       
    28     <echo message="BRAG STATUS: [${sf.brag.status}] - full build details available at ${build.drive}\output\logs\summary\_BRAG.xml"/>
       
    29     
       
    30     <!-- record brag information in BIT file -->
       
    31     <echo message="build_brag&#x0009;${sf.brag.status}${line.separator}" file="${build.log.dir}/bitinfo.txt" append="true"/>
       
    32     
       
    33     <!-- record build finished time in BIT file -->
       
    34     <tstamp>
       
    35       <format property="sf.build.finishedtime" pattern="yyyy-MM-dd HH:mm:ss" locale="en,UK"/>
       
    36     </tstamp>
       
    37     <echo message="finished&#x0009;${sf.build.finishedtime}${line.separator}" file="${build.log.dir}/bitinfo.txt" append="true"/>
       
    38     
       
    39     <!-- upload BIT info to database -->
       
    40     <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="false">
       
    41         <arg value="bitops.pl"/>
       
    42         <arg value="-c"/>
       
    43         <arg value="-f"/>
       
    44         <arg value="${build.log.dir}/bitinfo.txt"/>
       
    45     </exec>
       
    46   </target>
       
    47 	
       
    48 </project>