common/build.xml
changeset 865 d33d458149b9
parent 864 2b0f08dedb30
child 866 9dc266797c72
equal deleted inserted replaced
864:2b0f08dedb30 865:d33d458149b9
   185         </if>
   185         </if>
   186         <!-- Delete build directory -->
   186         <!-- Delete build directory -->
   187         <delete dir="${prep.build.dir}"/>
   187         <delete dir="${prep.build.dir}"/>
   188     </target>
   188     </target>
   189     
   189     
   190     <target name="sf-generate-source-spec">
       
   191         <!-- Generate the sources.csv if hg cache is activated -->
       
   192         <if><istrue value="${sf.spec.sourcesync.usecache}"/>
       
   193             <then>
       
   194                 <echo message="Generating Hg local cache..." />
       
   195                 <exec executable="perl" dir="${build.log.dir}" failonerror="true" output="${build.log.dir}/${build.id}_hgcache.log">
       
   196                     <arg value="${sf.common.config.dir}/tools/cachefiles.pl"/>
       
   197                     <arg value="${sf.spec.sourcesync.cachelocation}"/>
       
   198                     <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   199                     <arg value="${temp.build.dir}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   200                 </exec>
       
   201             </then>
       
   202         </if>
       
   203 
       
   204         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
       
   205         for multiple package builds, this needs to be linked with package name. -->
       
   206         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
       
   207         <delete file="${temp.build.dir}/source-spec.ant.xml"/>
       
   208         
       
   209         <property name="sf.test.csv.file" value="nul:"/>
       
   210 
       
   211         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
       
   212               outputFile="${temp.build.dir}/source-spec.ant.xml">
       
   213               <data expandProperties="yes">
       
   214                     ant: antProperties()
       
   215                     data: [
       
   216                         csv(${sf.test.csv.file}, {separator:','})
       
   217                         csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
       
   218                     ]
       
   219               </data>
       
   220         </fmpp>
       
   221     </target>
       
   222     
       
   223     <target name="generate-layers">
   190     <target name="generate-layers">
   224        <echo message="canno-file:${canonical.sysdef.file}"/>
   191        <echo message="canno-file:${canonical.sysdef.file}"/>
   225        <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   192        <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   226 
   193 
   227        <!-- All we want is a sysdef with the config name appended, so just copy it -->
   194        <!-- All we want is a sysdef with the config name appended, so just copy it -->
   366             </then>
   333             </then>
   367         </if>        
   334         </if>        
   368         <stopwatch name="sf-syncsource" action="elapsed"/>
   335         <stopwatch name="sf-syncsource" action="elapsed"/>
   369     </target>
   336     </target>
   370 
   337 
       
   338     <target name="sf-get-source" depends="sf-generate-source-spec">
       
   339         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
       
   340     </target>
       
   341     
       
   342     <target name="sf-generate-source-spec">
       
   343         <!-- Generate the sources.csv if hg cache is activated -->
       
   344         <if><istrue value="${sf.spec.sourcesync.usecache}"/>
       
   345             <then>
       
   346                 <echo message="Generating Hg local cache..." />
       
   347                 <exec executable="perl" dir="${build.log.dir}" failonerror="true" output="${build.log.dir}/${build.id}_hgcache.log">
       
   348                     <arg value="${sf.common.config.dir}/tools/cachefiles.pl"/>
       
   349                     <arg value="${sf.spec.sourcesync.cachelocation}"/>
       
   350                     <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   351                     <arg value="${temp.build.dir}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   352                 </exec>
       
   353             </then>
       
   354         </if>
       
   355 
       
   356         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
       
   357         for multiple package builds, this needs to be linked with package name. -->
       
   358         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
       
   359         <delete file="${temp.build.dir}/source-spec.ant.xml"/>
       
   360         
       
   361         <property name="sf.test.csv.file" value="nul:"/>
       
   362 
       
   363         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
       
   364               outputFile="${temp.build.dir}/source-spec.ant.xml">
       
   365               <data expandProperties="yes">
       
   366                     ant: antProperties()
       
   367                     data: [
       
   368                         csv(${sf.test.csv.file}, {separator:','})
       
   369                         csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
       
   370                     ]
       
   371               </data>
       
   372         </fmpp>
       
   373     </target>
       
   374     
   371     <!-- generate dir list using passed location and name 
   375     <!-- generate dir list using passed location and name 
   372     if a baseline list is available then generate deltas too -->
   376     if a baseline list is available then generate deltas too -->
   373 
   377 
   374     <target name="sf-list-dir">
   378     <target name="sf-list-dir">
   375         <property name="sf.currentlist.name"   value="${sf.list.name}"/> 
   379         <property name="sf.currentlist.name"   value="${sf.list.name}"/> 
   477       </else>
   481       </else>
   478     </if>
   482     </if>
   479     <stopwatch name="sf-model-from-project" action="elapsed"/>
   483     <stopwatch name="sf-model-from-project" action="elapsed"/>
   480   </target>
   484   </target>
   481     
   485     
   482     <target name="sf-get-source" depends="sf-generate-source-spec">
       
   483         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
       
   484     </target>
       
   485     
       
   486     <target name="sf-diamondize-bom" depends="sf-record-proj-conf-bom">
   486     <target name="sf-diamondize-bom" depends="sf-record-proj-conf-bom">
   487         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   487         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   488               outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
   488               outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
   489             <data expandProperties="yes">
   489             <data expandProperties="yes">
   490                 ant: antProperties()
   490                 ant: antProperties()