blob: 85adbb4efcfe1198c397a6b56f900511e3b934b1 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project default="makeZip"
name="Sign all jar files with Eclipse Foundation key">
<property name="target.dir" value="org.eclipse.epp/releng/org.eclipse.epp.usagedata.repository/target/" />
<property name="archive.name" value="org.eclipse.epp.usagedata.feature-${BUILD_TAG}.zip" />
<property name="udc.archiveDir" value="${buildDirectory}/${buildLabel}" />
<property name="udc.signInputDir"
value="/home/data/httpd/download-staging.priv/technology/epp" />
<property name="udc.inputFile" value="${udc.signInputDir}/${udc.archiveName}" />
<property name="udc.signOutputDir" value="${udc.signInputDir}/output" />
<property name="udc.outputFile" value="${udc.signOutputDir}/${udc.archiveName}" />
<target name="makeZip" depends="test.update.site.exists" if="update.site.exists">
<echo message="Zipping update site into ${archive.name}" />
<zip destfile="${archive.name}" basedir="${target.dir}"/>
</target>
<target name="test.update.site.exists">
<available file="${target.dir}" type="dir" property="update.site.exists" />
<echo message="${target.dir} exists: ${update.site.exists}" />
</target>
<target name="signJars" depends="test.signer.exists" if="signer.exists">
<mkdir dir="${udc.signOutputDir}" />
<chmod dir="${udc.signOutputDir}" perm="ugo+rw" />
<copy file="${udc.archiveDir}/${udc.archiveName}" todir="${udc.signInputDir}"
overwrite="true" />
<!-- TODO add pack.properties to zip file -->
<echo message="Start the external sign script" />
<exec executable="/usr/bin/sign" dir="${udc.signInputDir}"
output="sign.out" error="sign.err" append="true">
<arg value="${udc.inputFile}" />
<arg value="mail" />
<arg value="${udc.signOutputDir}" />
</exec>
<echo message="Waiting for file ${udc.outputFile}" />
<waitfor maxwait="15" maxwaitunit="minute" checkevery="5"
checkeveryunit="second">
<available file="${udc.outputFile}" />
</waitfor>
<sleep seconds="10" />
<echo message="Copying signed zip file to old location" />
<copy file="${udc.outputFile}" todir="${udc.archiveDir}"
overwrite="true" />
</target>
<!-- This target tests to see if the signer is available. We'll only attempt
to sign if it does. -->
<target name="test.signer.exists">
<available file="/usr/bin/sign" property="signer.exists" />
</target>
</project>