2009-07-24 15:03:58 -04:00
|
|
|
<project name="upload" default="upload" basedir=".">
|
2009-07-24 09:52:15 -04:00
|
|
|
<description>
|
|
|
|
Ant build file used to upload binaries to openjpa.apache.org/builds/latest.
|
|
|
|
</description>
|
|
|
|
<target name="upload">
|
2009-07-24 15:03:58 -04:00
|
|
|
|
|
|
|
<property name="build.dir" value="/www/openjpa.apache.org/builds"/>
|
|
|
|
<property name="host" value="people.apache.org"/>
|
|
|
|
|
2009-07-24 09:52:15 -04:00
|
|
|
<mkdir dir="target/site/tempDocs" />
|
|
|
|
<unzip dest="target/site/tempDocs">
|
|
|
|
<fileset dir="target/site/downloads">
|
|
|
|
<include name="*binary*.zip" />
|
|
|
|
</fileset>
|
|
|
|
<patternset>
|
|
|
|
<include name="**/javadoc/**" />
|
|
|
|
<include name="**/manual/**" />
|
|
|
|
</patternset>
|
|
|
|
</unzip>
|
2009-07-24 15:03:58 -04:00
|
|
|
<zip destfile="target/site/tempDocs/docs.zip">
|
|
|
|
<fileset dir="target/site/tempDocs">
|
|
|
|
<include name="**/javadoc/**"/>
|
|
|
|
<include name="**/manual/**"/>
|
|
|
|
<exclude name="docs/**"/>
|
|
|
|
</fileset>
|
|
|
|
</zip>
|
2009-07-24 09:52:15 -04:00
|
|
|
<checksum>
|
|
|
|
<fileset dir="target/site/downloads/">
|
|
|
|
<include name="*.zip" />
|
|
|
|
</fileset>
|
|
|
|
</checksum>
|
2009-07-24 15:03:58 -04:00
|
|
|
|
|
|
|
<scp todir="${nightly.user.name}:${nightly.password}@${host}:${build.dir}" trust="true">
|
|
|
|
<fileset dir="target/site/tempDocs">
|
|
|
|
<include name="docs.zip"/>
|
|
|
|
</fileset>
|
2009-07-24 09:52:15 -04:00
|
|
|
</scp>
|
2009-07-24 16:25:33 -04:00
|
|
|
<!-- remove directories, hopefully this fails silently. mkdir does not and stops the process these exist.-->
|
|
|
|
<sshexec host="${host}" username="${nightly.user.name}" password="${nightly.password}" command="rm -Rf ${build.dir}/apache-openjpa-${pom.version}/docs" trust="true" />
|
|
|
|
<sshexec host="${host}" username="${nightly.user.name}" password="${nightly.password}" command="rm -Rf ${build.dir}/apache-openjpa-${pom.version}/downloads" trust="true" />
|
2009-07-24 15:03:58 -04:00
|
|
|
<sshexec host="${host}" username="${nightly.user.name}" password="${nightly.password}" command="unzip -qq -d ${build.dir}/ ${build.dir}/docs.zip" trust="true" />
|
|
|
|
<sshexec host="${host}" username="${nightly.user.name}" password="${nightly.password}" command="rm ${build.dir}/docs.zip" trust="true" />
|
|
|
|
<sshexec host="${host}" username="${nightly.user.name}" password="${nightly.password}" command="mkdir ${build.dir}/apache-openjpa-${pom.version}/downloads " trust="true" />
|
|
|
|
|
|
|
|
<scp todir="${nightly.user.name}:${nightly.password}@${host}:${build.dir}/apache-openjpa-${pom.version}/downloads" trust="true">
|
|
|
|
<fileset dir="target/site/downloads" />
|
2009-07-24 09:52:15 -04:00
|
|
|
</scp>
|
2009-07-24 15:03:58 -04:00
|
|
|
|
|
|
|
<sshexec host="${host}" username="${nightly.user.name}" password="${nightly.password}" command="chmod -R g+w ${build.dir}/apache-openjpa-${pom.version}" trust="true" />
|
|
|
|
|
2009-07-24 09:52:15 -04:00
|
|
|
<delete>
|
|
|
|
<fileset dir="target/site/tempDocs" />
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
</project>
|
|
|
|
|