blob: 42cd43affd9f4ba27bed2516964f99adf813f481 [file] [log] [blame]
<!--
Copyright (c) 2010 BSI Business Systems Integration AG.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
BSI Business Systems Integration AG - initial API and implementation
-->
<!--
All jar files getting signed with the Eclipse certificate. The input will be zipped and moved to the
${signInputFolder}. Then the sign process (external process) is getting started. Since the sign process is async
a wait loop waits to receive the signd zip in the ${signOutputFolder}.
Set ${skipSign} property to true to skip this step.
The output folder (${buildDataDir}/step060/output) is used by step100 and step200.
-->
<project name="step060.sign" default="build">
<property file="build.properties" />
<taskdef name="waitForFile" classname="org.eclipse.scout.releng.ant.WaitForFile" />
<target name="clean">
<delete dir="${buildDataDir}/step060" />
</target>
<target name="build">
<condition property="conditionSkipSign">
<istrue value="${skipSign}"/>
</condition>
<antcall target="skipSignTask" />
<available file="${buildDataDir}/step060/output/sign.created" property="skipStep060" />
<antcall target="sign" />
<delete dir="${buildDataDir}/step060/input" failonerror="false" />
</target>
<target name="skipSignTask" if="conditionSkipSign">
<echo message="skip sign" />
<antcall target="clean" />
<property name="outputFolder" location="${buildDataDir}/step060/output" />
<mkdir dir="${outputFolder}" />
<copy todir="${outputFolder}">
<fileset dir="${buildDataDir}/step050/output">
<include name="**/*" />
<exclude name="*.created" />
</fileset>
</copy>
<touch file="${outputFolder}/sign.created" />
</target>
<target name="sign" unless="skipStep060">
<antcall target="clean" />
<delete dir="${signInputFolder}" />
<delete dir="${signOutputFolder}" />
<property name="inputFolder" location="${buildDataDir}/step060/input" />
<property name="outputFolder" location="${buildDataDir}/step060/output" />
<mkdir dir="${inputFolder}" />
<copy todir="${inputFolder}">
<fileset dir="${buildDataDir}/step050/output">
<include name="**/*" />
<exclude name="*.created" />
</fileset>
</copy>
<!-- sign -->
<mkdir dir="${signInputFolder}" />
<mkdir dir="${signOutputFolder}" />
<zip destfile="${signInputFolder}/sign.zip">
<fileset dir="${inputFolder}">
<include name="**/**" />
</fileset>
</zip>
<exec executable="sign" failifexecutionfails="no">
<arg value="${signInputFolder}/sign.zip" />
<arg value="nomail" />
<arg value="${signOutputFolder}" />
</exec>
<waitForFile file="${signOutputFolder}/sign.zip" maxMinutes="30" maxSecounds="0" pollSecounds="10"/>
<mkdir dir="${outputFolder}"/>
<unzip dest="${outputFolder}" src="${signOutputFolder}/sign.zip" />
<touch file="${outputFolder}/sign.created" />
</target>
</project>