440 </if> |
440 </if> |
441 </target> |
441 </target> |
442 |
442 |
443 <target name="sf-preprocess-package-config"> |
443 <target name="sf-preprocess-package-config"> |
444 <mkdir dir="${sf.common.config.dir}/generated"/> |
444 <mkdir dir="${sf.common.config.dir}/generated"/> |
445 <if> |
|
446 <istrue value="${sf.spec.package.src.enable}"/> |
|
447 <then> |
|
448 <echo message="INFO Packaging Source Repos"/> |
|
449 <property name="sf-preprocess-package-config.arg" value=""/> |
|
450 </then> |
|
451 <else> |
|
452 <echo message="INFO Packaging: Ignoring Source Repos"/> |
|
453 <property name="sf-preprocess-package-config.arg" value="--nosource"/> |
|
454 </else> |
|
455 </if> |
|
456 |
|
457 <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log"> |
445 <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log"> |
458 <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/> |
446 <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/> |
459 <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/> |
447 <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/> |
460 <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/> |
448 <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/> |
461 <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
449 <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
462 <arg value="${build.log.dir}/rnd_excludefile.txt"/> |
450 <arg value="${build.log.dir}/rnd_excludefile.txt"/> |
463 <arg value="${sf-preprocess-package-config.arg}"/> |
|
464 </exec> |
451 </exec> |
465 </target> |
452 </target> |
466 |
453 |
467 <target name="sf-zip-content" depends="preprocess-zip-config"> |
454 <target name="sf-zip-content" depends="preprocess-zip-config"> |
468 <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" /> |
455 <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" /> |
469 <property name="zips.${zip.target.name}.spec.name" value="${zip.target.name}" /> |
456 <property name="zips.${zip.target.name}.spec.name" value="${zip.target.name}" /> |
470 <hlm:zipContentMacro type="${zip.target.name}" file="${zip.config.file}" /> |
457 <hlm:zipContentMacro type="${zip.target.name}" file="${zip.config.file}" /> |
471 </target> |
458 </target> |
472 |
459 |
473 <target name="sf-package-source" depends="sf-preprocess-package-config"> |
460 <target name="sf-package-source" depends="sf-preprocess-package-config"> |
474 <!-- Firstly zip up src & rnd by package --> |
461 <!-- Firstly zip up rnd by package --> |
475 <antcall target="sf-zip-content"> |
|
476 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
|
477 <param name="zip.target.name" value="src" /> |
|
478 </antcall> |
|
479 <antcall target="sf-zip-content"> |
462 <antcall target="sf-zip-content"> |
480 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
463 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
481 <param name="zip.target.name" value="rnd" /> |
464 <param name="zip.target.name" value="rnd" /> |
482 </antcall> |
465 </antcall> |
483 <antcall target="sf-zip-content"> |
466 <antcall target="sf-zip-content"> |
484 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
467 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
485 <param name="zip.target.name" value="rnd-internal" /> |
468 <param name="zip.target.name" value="rnd-internal" /> |
486 </antcall> |
469 </antcall> |
487 <!-- Then zip up src zips by layer --> |
470 <if> |
488 <antcall target="sf-zip-content"> |
471 <istrue value="${sf.spec.package.src.enable}"/> |
489 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
472 <then> |
490 <param name="zip.target.name" value="src-by-layer" /> |
473 <echo message="INFO Packaging Source Repos"/> |
491 </antcall> |
474 <antcall target="sf-zip-content"> |
492 </target> |
475 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
493 |
476 <param name="zip.target.name" value="src" /> |
494 <!-- unpack rnd zips if available --> |
477 </antcall> |
|
478 <!-- Then zip up src zips by layer --> |
|
479 <antcall target="sf-zip-content"> |
|
480 <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/> |
|
481 <param name="zip.target.name" value="src-by-layer" /> |
|
482 </antcall> |
|
483 </then> |
|
484 </if> |
|
485 </target> |
|
486 |
|
487 <!-- Unpack the rnd zips ready to be used in the build --> |
495 <target name="sf-unpack-rnd"> |
488 <target name="sf-unpack-rnd"> |
496 <echo message="Unpacking any available RnD binaries"/> |
489 <echo message="Unpacking any available RnD binaries"/> |
497 <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log"> |
490 <for param="rndZip"> |
498 <arg value="x"/> |
491 <fileset dir="${build.drive}/output/zips/"> |
499 <arg value="-y"/> <!-- Need to unpack in overwrite mode, due to TEF --> |
492 <include name="binaries_*.zip"/> <!-- Internal rnd bins --> |
500 <arg value="${build.drive}/output/zips/bin*.zip"/> |
493 <include name="release/bin_*.zip"/> <!-- Releaseable rnd bins --> |
501 </exec> |
494 </fileset> |
502 </target> |
495 <sequential> |
503 |
496 <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log" append="true"> |
|
497 <arg value="x"/> |
|
498 <arg value="-y"/> <!-- Need to unpack in overwrite mode, due to TEF --> |
|
499 <arg value="@{rndZip}"/> |
|
500 </exec> |
|
501 </sequential> |
|
502 </for> |
|
503 </target> |
|
504 |
504 </project> |
505 </project> |
505 |
506 |