Diamondize BOM info
authorDarioS@UK-DarioS.symbian.int
Wed, 15 Apr 2009 14:30:07 +0100
changeset 61 6066a7d39270
parent 60 f9a55f310713
child 62 2771e394c9bd
Diamondize BOM info
common/build.xml
common/templates/build-info.xml.ftl
--- a/common/build.xml	Thu Apr 09 16:08:12 2009 +0100
+++ b/common/build.xml	Wed Apr 15 14:30:07 2009 +0100
@@ -145,7 +145,14 @@
             <then>
                 <runtarget target="sf-get-source"/>
             </then>
-        </if>     
+        </if>
+        
+      <if>
+        <istrue value="${sf.spec.publish.enable}"/>
+        <then>
+          <runtarget target="sf-diamondize-bom"/>
+        </then>
+      </if>
     </target>
     
   <target name="sf-postbuild">
@@ -222,6 +229,20 @@
       </fmpp>
       <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
     </target>
+    
+    <target name="sf-diamondize-bom">
+      <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
+            outputFile="${build.drive}/output/logs/BOM/build-info.xml">
+        <data expandProperties="yes">
+              ant: antProperties()
+              config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
+              project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
+              baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
+              sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,rev]})
+              
+        </data>
+      </fmpp>
+    </target>
 
 </project>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/templates/build-info.xml.ftl	Wed Apr 15 14:30:07 2009 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<diamonds-build>
+  <content>
+    <project>
+      <name>Config</name>
+      <#list config as c>
+ 	  <baseline>${c.loc}#${c.rev}</baseline>
+ 	  </#list>
+    </project>
+    <project>
+      <name>Project</name>
+      <#list project as p>
+ 	  <baseline>${p.loc}#${p.rev}</baseline>
+ 	  </#list>
+    </project>
+    <project>
+      <name>Baseline</name>
+      <#list baseline as b>
+      <baseline>${b}</baseline>
+      </#list>
+    </project>
+    <project>
+ 	  <name>Sources</name>
+ 	  <#list sources as s>
+ 	  <baseline>${s.loc}#${s.rev}</baseline>
+ 	  </#list>
+    </project>
+  </content>
+</diamonds-build>