common/build.xml
changeset 601 3489a650c6fa
parent 596 3bb02a90f7e7
child 602 022273556ac9
--- a/common/build.xml	Mon Oct 05 18:28:44 2009 +0100
+++ b/common/build.xml	Tue Oct 06 13:50:26 2009 +0100
@@ -191,25 +191,35 @@
     </target>
 
     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-noprep"/>
-    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-tag-build,sf-record-proj-conf-bom,sf-getenvs,sf-syncsource,sf-diamondize-bom"/>
+    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-tag-build,sf-record-proj-conf-bom,sf-getenvs,sf-syncsource,sf-diamondize-bom"/>
     
     <target name="sf-prebuild-announce">
         <echo>[SF-PREBUILD]</echo>
     </target>
+    
+    <target name="sf-diamonds-connect">
+      <if>
+        <istrue value="${sf.spec.publish.enable}"/>
+        <then>
+          <echo>[SF-DIAMONDS-CONNECT]</echo>
+          <runtarget target="diamonds"/>
+          <echo message="Save Diamonds build id value in a file"/>
+          <echo message="diamonds.build.id=${diamonds.build.id}" file="${build.log.dir}/diamonds_build_id.txt"/>
+        </then>
+      </if>
+    </target>
 
     <target name="sf-diamonds-tag-build">
       <if>
         <istrue value="${sf.spec.publish.enable}"/>
         <then>
           <echo>[SF-DIAMONDS-TAG-BUILD]</echo>
-          <runtarget target="diamonds"/>
-          <echo message="Save Diamonds build id value in a file"/>
-          <echo message="diamonds.build.id=${diamonds.build.id}" file="${build.log.dir}/diamonds_build_id.txt"/>
-          <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-tag-build.xml.ftl" outputFile="${build.drive}/output/logs/sf-tag-build.xml">
-            <data expandProperties="yes">
-              ant: antProperties()
-            </data>
-          </fmpp>
+          <echo message="Generate ${build.drive}/output/logs/sf-diamonds-tag-build.xml with Diamonds tags for this build"/>
+          <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true">
+            <arg value="${sf.common.config.dir}/tools/generate_diamonds_tags_xml.pl"/>
+            <arg value="--tags=${sf.diamonds.tags}"/>
+            <arg value="--output=${build.drive}/output/logs/sf-diamonds-tag-build.xml"/>
+          </exec>
         </then>
       </if>
     </target>