| <?xml version="1.0" encoding="UTF-8"?> |
| <project name="sign" xmlns:ivy="antlib:org.apache.ivy.ant"> |
| |
| <target name="waitForSign" depends="ivy.init"> |
| <fail message="The 'stagingDirectory' property must be set on this project."> |
| <condition> |
| <not> |
| <isset property="stagingDirectory"/> |
| </not> |
| </condition> |
| </fail> |
| <fail message="The 'archiveName' property must be set on this project."> |
| <condition> |
| <not> |
| <isset property="archiveName"/> |
| </not> |
| </condition> |
| </fail> |
| <fail message="The 'eclipse.committerId' property must be set on this project."> |
| <condition> |
| <not> |
| <isset property="eclipse.committerId"/> |
| </not> |
| </condition> |
| </fail> |
| <fail message="The 'stagingDirectoryOutput' property must be set on this project."> |
| <condition> |
| <not> |
| <isset property="stagingDirectoryOutput"/> |
| </not> |
| </condition> |
| </fail> |
| <property name="signpoll" value="ssh" /> |
| <property name="signhost" value="build.eclipse.org" /> |
| <property name="signquote" value=""" /> |
| <property name="archiveName" value="org.apache.openejb.core_4.0.0.beta-2_v201205260545-virgo-3.jar" /> |
| <property name="signpollline" value="${eclipse.committerId}@${signhost} ${signquote}cd ${stagingDirectoryOutput};ls ${archiveName}${signquote}" /> |
| |
| <echo message="DEBUG: signing - signpoll: ${signpoll}" /> |
| <echo message="DEBUG: signing - signpollline: ${signpollline}" /> |
| <echo message="DEBUG: signing - signquote: ${signquote}" /> |
| <echo message="DEBUG: signing - stagingDirectoryoutput: ${stagingDirectoryOutput}" /> |
| <echo message="DEBUG: signing - archiveName: ${archiveName}" /> |
| |
| <antcall target="waitForChangedAttribs"> |
| <param name="signpoll" value="${signpoll}" /> |
| <param name="signpollline" value="${signpollline}" /> |
| </antcall> |
| </target> |
| |
| <target name="compareAttribs"> |
| <!--poll file for change in attributes --> |
| <exec |
| dir="${target.dir}" |
| executable="${signpoll}" |
| outputProperty="polledAttribs"> |
| <arg line="${signpollline}" /> |
| </exec> |
| <condition property="attribChanged"> |
| <and> |
| <not> |
| <contains |
| string="${polledAttribs}" |
| substring="Permission denied, please try again." |
| casesensitive="no" /> |
| </not> |
| <not> |
| <contains |
| string="${polledAttribs}" |
| substring="Host key verification failed." |
| casesensitive="no" /> |
| </not> |
| <or> |
| <not> |
| <contains |
| string="${polledAttribs}" |
| substring="No such file or directory" |
| casesensitive="no" /> |
| </not> |
| <contains |
| string="${polledAttribs}" |
| substring="bash: line 0: cd:" |
| casesensitive="no" /> |
| </or> |
| </and> |
| </condition> |
| <echo message="polled: ${polledAttribs}" /> |
| <antcall target="writeDiffResult" /> |
| <sleep seconds="120" /> |
| <available |
| property="attribs.changed" |
| file="${target.dir}/attribDiff.txt" /> |
| <antcall target="waitForChangedAttribs" /> |
| </target> |
| |
| <target |
| name="waitForChangedAttribs" |
| unless="attribs.changed"> |
| <antcall |
| target="compareAttribs" |
| inheritAll="false"> |
| <param |
| name="signpoll" |
| value="${signpoll}" /> |
| </antcall> |
| </target> |
| |
| <target |
| name="writeDiffResult" |
| if="attribChanged"> |
| <echo |
| message="new: ${polledAttribs}" |
| file="${target.dir}/attribDiff.txt" |
| append="true" /> |
| </target> |
| |
| </project> |