common/templates/source-spec.ant.xml.ftl
changeset 47 d835e951a925
parent 46 34dc6e6caaa4
child 48 758d416f5872
equal deleted inserted replaced
46:34dc6e6caaa4 47:d835e951a925
     3 
     3 
     4 <#assign fileset = "" />
     4 <#assign fileset = "" />
     5 <#assign target_depends = "" />
     5 <#assign target_depends = "" />
     6 <#assign dollar = "$"/>
     6 <#assign dollar = "$"/>
     7 <#assign count = 0 />
     7 <#assign count = 0 />
       
     8 
       
     9 <!-- remove actual_sources.csv file -->
       
    10 <delete file="${ant['build.drive']}/output/BOM/sources.csv" quiet="true"/>
     8 
    11 
     9 <#list data as pkg_detail>
    12 <#list data as pkg_detail>
    10     <target name="sf-prebuild-${count}">
    13     <target name="sf-prebuild-${count}">
    11         <#if (count > 0) >
    14         <#if (count > 0) >
    12             <#assign fileset = "${fileset}"  />
    15             <#assign fileset = "${fileset}"  />
    24                 </hlm:update>
    27                 </hlm:update>
    25                 <exec command="hg identify -n" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.repo.n"/>
    28                 <exec command="hg identify -n" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.repo.n"/>
    26                 <exec command="hg identify -i" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.repo.i"/>
    29                 <exec command="hg identify -i" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.repo.i"/>
    27                 <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${sf.sourcesync.repo.n}:${sf.sourcesync.repo.i}"/>
    30                 <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${sf.sourcesync.repo.n}:${sf.sourcesync.repo.i}"/>
    28             </hlm:scm>
    31             </hlm:scm>
       
    32             
       
    33             <!-- record info on sf-config repo/rev -->
       
    34             <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.rev">
       
    35                 <arg value="identify"/>
       
    36                 <arg value="-i"/>
       
    37             </exec>
       
    38             <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${sf.sourcesync.${count}.rev}"/>
       
    39             <exec executable="cmd" dir="${ant['build.drive']}/output/BOM" output="sources.csv" append="true">
       
    40                 <arg value="/c"/>
       
    41                 <arg value="echo"/>
       
    42                 <arg value="${pkg_detail.source},${pkg_detail.dst},${sf.sourcesync.${count}.rev}"/>
       
    43             </exec>
       
    44         
    29         </sequential>
    45         </sequential>
    30     </target>
    46     </target>
    31     <#assign fileset = "${fileset}" + "<fileset dir=\"${ant['build.drive']}${pkg_detail.dst}\" includes=\"${pkg_detail.pattern}\"/>" />
    47     <#assign fileset = "${fileset}" + "<fileset dir=\"${ant['build.drive']}${pkg_detail.dst}\" includes=\"${pkg_detail.pattern}\"/>" />
    32     
    48     
    33     <#if (count == 0) >
    49     <#if (count == 0) >