OPENJPA-1836 Only perform chmod on files/dirs that the nightly.user.name owns

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1023060 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-10-15 18:28:57 +00:00
parent fa8a517fb0
commit eac769a299
1 changed files with 8 additions and 5 deletions

View File

@ -48,24 +48,27 @@
<include name="*.zip" />
</fileset>
</checksum>
<!-- update ${build.dir}/apache-openjpa-${project.version}/docs -->
<scp todir="${nightly.user.name}@${host}:${build.dir}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" trust="true" sftp="true">
<fileset dir="target/site/tempDocs">
<include name="docs.zip"/>
</fileset>
</scp>
<!-- remove directories, hopefully this fails silently. mkdir does not and stops the process these exist.-->
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="rm -Rf ${build.dir}/apache-openjpa-${project.version}/docs" trust="true" />
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="rm -Rf ${build.dir}/apache-openjpa-${project.version}/downloads" trust="true" />
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="unzip -qq -d ${build.dir}/ ${build.dir}/docs.zip" trust="true" />
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="rm ${build.dir}/docs.zip" trust="true" />
<!-- update ${build.dir}/apache-openjpa-${project.version}/downloads -->
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="rm -Rf ${build.dir}/apache-openjpa-${project.version}/downloads" trust="true" />
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="mkdir ${build.dir}/apache-openjpa-${project.version}/downloads " trust="true" />
<scp todir="${nightly.user.name}@${host}:${build.dir}/apache-openjpa-${project.version}/downloads" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" trust="true">
<fileset dir="target/site/downloads" />
</scp>
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="chmod -R g+w ${build.dir}/apache-openjpa-${project.version}" trust="true" />
<!-- update ACLs in ${build.dir}/apache-openjpa-${project.version} -->
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="find ${build.dir}/apache-openjpa-${project.version} -user ${nightly.user.name} -type d | xargs chmod 775" trust="true" />
<sshexec host="${host}" username="${nightly.user.name}" keyfile="${nightly.keyfile}" passphrase="${nightly.passphrase}" command="find ${build.dir}/apache-openjpa-${project.version} -user ${nightly.user.name} -type f | xargs chmod 664" trust="true" />
<delete>
<fileset dir="target/site/tempDocs" />