blob: d3700d72afddcc0670f5410b3393406bb2a172ed [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project default="signJars"
name="Sign all jar files with Eclipse Foundation key">
<property name="target.dir" value="${WORKSPACE}/org.eclipse.epp/releng/org.eclipse.epp.usagedata.repository/target/" />
<property name="archive.name" value="org.eclipse.epp.usagedata-unsigned.zip" />
<property name="unsigned.dir" value="${WORKSPACE}/unsigned" />
<property name="unsigned.file" value="${unsigned.dir}/${archive.name}" />
<property name="signed.dir" value="${WORKSPACE}/signed" />
<property name="signer.input.dir" value="/home/data/httpd/download-staging.priv/technology/epp" />
<property name="signer.output.dir" value="${signer.input.dir}/output" />
<property name="signer.input.file" value="${signer.input.dir}/${archive.name}" />
<property name="signer.output.file" value="${signer.output.dir}/${archive.name}" />
<property name="signer.out" value="${signer.output.dir}/out.log" />
<property name="signer.err" value="${signer.output.dir}/err.log" />
<target name="makeZip">
<echo message="Zipping update site into ${unsigned.file}" />
<zip destfile="${unsigned.file}" basedir="${target.dir}"/>
</target>
<target name="signJars" depends="makeZip">
<mkdir dir="${signer.output.dir}" />
<chmod dir="${signer.output.dir}" perm="ugo+rw" />
<copy file="${unsigned.file}" todir="${signer.input.dir}" overwrite="true" />
<echo message="Start the external sign script" />
<exec executable="/usr/bin/sign" dir="${signer.input.dir}" output="signer.out" error="signer.err" append="true">
<arg value="${signer.input.file}" />
<arg value="mail" />
<arg value="${signer.output.dir}" />
</exec>
<echo message="Waiting for file ${archive.name}" />
<waitfor maxwait="15" maxwaitunit="minute" checkevery="5" checkeveryunit="second">
<available file="${signer.output.file}" />
</waitfor>
<sleep seconds="10" />
<echo message="Copying signed zip file to old location" />
<copy todir="${signed.dir}" overwrite="true">
<fileset dir="${signer.output.dir}" />
</copy>
</target>
</project>