New implementation of generation of BOM sources.csv
authorDarioS@UK-DarioS.symbian.int
Wed, 08 Apr 2009 11:59:04 +0100
changeset 47 d835e951a925
parent 46 34dc6e6caaa4
child 48 758d416f5872
New implementation of generation of BOM sources.csv
common/build.xml
common/templates/source-spec.ant.xml.ftl
--- a/common/build.xml	Mon Apr 06 11:09:18 2009 +0100
+++ b/common/build.xml	Wed Apr 08 11:59:04 2009 +0100
@@ -43,7 +43,7 @@
     ** TARGET DEFINITIONS
     -->   
     
-    <target name="sf-prep" depends="sf-generate-source-spec, prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
+    <target name="sf-prep" depends="sf-generate-source-spec,prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
         <echo>[SF-PREP]</echo>
         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
     </target>
@@ -79,6 +79,9 @@
     <target name="sf-prebuild">
         <echo>[SF-PREBUILD]</echo>
         
+        <!-- create BOM dir -->
+        <mkdir dir="${build.drive}/output/BOM"/>
+        
         <if>
             <istrue value="${sf.spec.baseline.enable}" />
             <then>
--- a/common/templates/source-spec.ant.xml.ftl	Mon Apr 06 11:09:18 2009 +0100
+++ b/common/templates/source-spec.ant.xml.ftl	Wed Apr 08 11:59:04 2009 +0100
@@ -6,6 +6,9 @@
 <#assign dollar = "$"/>
 <#assign count = 0 />
 
+<!-- remove actual_sources.csv file -->
+<delete file="${ant['build.drive']}/output/BOM/sources.csv" quiet="true"/>
+
 <#list data as pkg_detail>
     <target name="sf-prebuild-${count}">
         <#if (count > 0) >
@@ -26,6 +29,19 @@
                 <exec command="hg identify -i" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.repo.i"/>
                 <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${sf.sourcesync.repo.n}:${sf.sourcesync.repo.i}"/>
             </hlm:scm>
+            
+            <!-- record info on sf-config repo/rev -->
+            <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.rev">
+                <arg value="identify"/>
+                <arg value="-i"/>
+            </exec>
+            <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${sf.sourcesync.${count}.rev}"/>
+            <exec executable="cmd" dir="${ant['build.drive']}/output/BOM" output="sources.csv" append="true">
+                <arg value="/c"/>
+                <arg value="echo"/>
+                <arg value="${pkg_detail.source},${pkg_detail.dst},${sf.sourcesync.${count}.rev}"/>
+            </exec>
+        
         </sequential>
     </target>
     <#assign fileset = "${fileset}" + "<fileset dir=\"${ant['build.drive']}${pkg_detail.dst}\" includes=\"${pkg_detail.pattern}\"/>" />