2003-01-20 16:57:23 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!-- Smack Build Script ========================================== -->
|
|
|
|
<!-- Jive Software ============================================== -->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
$RCSfile$
|
|
|
|
$Revision$
|
|
|
|
$Date$
|
|
|
|
-->
|
|
|
|
|
|
|
|
<project name="Smack Release Script" default="all" basedir="..">
|
|
|
|
|
2003-04-05 03:13:07 +02:00
|
|
|
<!-- Include Ant Optional Tasks -->
|
|
|
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${basedir}/build/ant-contrib.jar"/>
|
|
|
|
</classpath>
|
2003-08-05 04:37:03 +02:00
|
|
|
</taskdef>
|
2003-04-05 03:13:07 +02:00
|
|
|
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- PROPERTIES -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
|
|
|
<!-- TARGETS -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
|
|
|
<!-- all -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="all">
|
2003-08-05 04:37:03 +02:00
|
|
|
<!-- create release properties -->
|
2003-04-05 03:13:07 +02:00
|
|
|
<if>
|
|
|
|
<equals arg1="${dailybuild}" arg2="true" />
|
|
|
|
<then>
|
|
|
|
<tstamp>
|
|
|
|
<format property="build.date" pattern="MMM-dd-yyyy" locale="en"/>
|
|
|
|
</tstamp>
|
|
|
|
<property name="release.name" value="smack-${build.date}" />
|
2003-09-28 21:34:31 +02:00
|
|
|
<property name="release-dev.name" value="smack-dev-${build.date}" />
|
2003-04-05 03:13:07 +02:00
|
|
|
</then>
|
|
|
|
<else>
|
2003-04-25 23:00:48 +02:00
|
|
|
<property name="release.name" value="smack-${version.name}" />
|
2003-09-28 21:34:31 +02:00
|
|
|
<property name="release-dev.name" value="smack-dev-${version.name}" />
|
2003-04-05 03:13:07 +02:00
|
|
|
</else>
|
2003-08-05 04:37:03 +02:00
|
|
|
</if>
|
2003-01-20 16:57:23 +01:00
|
|
|
<property name="release.dir" value="${basedir}/release/${release.name}" />
|
2003-09-28 21:34:31 +02:00
|
|
|
<property name="release-dev.dir" value="${basedir}/release/${release-dev.name}" />
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- create release dirs -->
|
|
|
|
<mkdir dir="${release.dir}" />
|
2003-09-28 21:34:31 +02:00
|
|
|
<mkdir dir="${release-dev.dir}" />
|
2003-01-24 03:44:25 +01:00
|
|
|
<!-- Copy smack.jar -->
|
|
|
|
<copy todir="${release.dir}">
|
2003-01-24 04:30:37 +01:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
|
2003-08-02 00:14:28 +02:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
|
2003-01-24 03:44:25 +01:00
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}">
|
|
|
|
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
|
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
|
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Copy build dir -->
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/build">
|
2003-01-20 16:57:23 +01:00
|
|
|
<fileset dir="${basedir}/build">
|
|
|
|
<include name="ant*" />
|
2003-08-05 04:37:03 +02:00
|
|
|
<include name="junit.jar" />
|
2003-01-20 16:57:23 +01:00
|
|
|
<include name="build.xml" />
|
|
|
|
<include name="README.html" />
|
|
|
|
<include name="lib/*.jar" />
|
2003-01-24 04:30:37 +01:00
|
|
|
<include name="merge/*.jar" />
|
2003-01-20 16:57:23 +01:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<!-- Copy Javadocs -->
|
|
|
|
<copy todir="${release.dir}/javadoc">
|
|
|
|
<fileset dir="${basedir}/javadoc" includes="**/*.*" />
|
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/javadoc">
|
|
|
|
<fileset dir="${basedir}/javadoc" includes="**/*.*" />
|
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Copy documentation -->
|
|
|
|
<copy todir="${release.dir}/documentation">
|
|
|
|
<fileset dir="${basedir}/documentation" includes="**/*.*" />
|
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/documentation">
|
|
|
|
<fileset dir="${basedir}/documentation" includes="**/*.*" />
|
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Copy source -->
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/source">
|
2003-01-20 16:57:23 +01:00
|
|
|
<fileset dir="${basedir}/source" includes="**/*.java" />
|
2003-08-05 04:37:03 +02:00
|
|
|
<fileset dir="${basedir}/source" includes="**/*.html" />
|
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/test">
|
2003-08-05 04:37:03 +02:00
|
|
|
<fileset dir="${basedir}/test" includes="**/*.java" />
|
|
|
|
</copy>
|
|
|
|
<!-- Copy resources -->
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/build/resources">
|
2003-09-28 20:45:09 +02:00
|
|
|
<fileset dir="${basedir}/build/resources" includes="META-INF/smack.providers" />
|
2003-01-20 16:57:23 +01:00
|
|
|
</copy>
|
|
|
|
<!-- Copy readme.html and changelog.html -->
|
|
|
|
<copy todir="${release.dir}">
|
2003-09-28 20:45:09 +02:00
|
|
|
<fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
|
2003-01-20 16:57:23 +01:00
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}">
|
|
|
|
<fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
|
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Package -->
|
|
|
|
<zip destfile="${basedir}/release/${release.name}.zip"
|
|
|
|
basedir="${release.dir}/.."
|
|
|
|
includes="${release.name}/**/*.*"
|
|
|
|
/>
|
|
|
|
<tar destfile="${basedir}/release/${release.name}.tar.gz"
|
|
|
|
basedir="${release.dir}/.."
|
|
|
|
includes="${release.name}/**/*.*"
|
|
|
|
compression="gzip"
|
|
|
|
/>
|
2003-09-28 21:34:31 +02:00
|
|
|
<zip destfile="${basedir}/release/${release-dev.name}.zip"
|
|
|
|
basedir="${release-dev.dir}/.."
|
|
|
|
includes="${release-dev.name}/**/*.*"
|
|
|
|
/>
|
|
|
|
<tar destfile="${basedir}/release/${release-dev.name}.tar.gz"
|
|
|
|
basedir="${release-dev.dir}/.."
|
|
|
|
includes="${release-dev.name}/**/*.*"
|
|
|
|
compression="gzip"
|
|
|
|
/>
|
2003-08-05 04:37:03 +02:00
|
|
|
|
|
|
|
<echo>
|
|
|
|
-----------------------------------------------
|
|
|
|
Release made, testing Ant targets of release...
|
|
|
|
-----------------------------------------------
|
|
|
|
</echo>
|
|
|
|
|
|
|
|
<!-- call the release tester -->
|
|
|
|
<antcall target="test" />
|
|
|
|
</target>
|
|
|
|
|
2003-09-18 05:48:49 +02:00
|
|
|
<!-- test -->
|
2003-08-05 04:37:03 +02:00
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="test">
|
2003-09-28 21:34:31 +02:00
|
|
|
<property name="testdir" value="${release-dev.dir}/.test" />
|
2003-09-18 05:48:49 +02:00
|
|
|
|
|
|
|
<!-- copy the build to a temp dir so we can run sanity tests -->
|
|
|
|
<mkdir dir="${testdir}" />
|
|
|
|
<copy todir="${testdir}">
|
2003-09-28 21:34:31 +02:00
|
|
|
<fileset dir="${release-dev.dir}">
|
2003-09-18 05:48:49 +02:00
|
|
|
<exclude name=".test/**/*.*" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- run sanity tests -->
|
|
|
|
<ant dir="${testdir}" antfile="build/build.xml" target="jar" inheritAll="false">
|
2003-08-05 04:37:03 +02:00
|
|
|
<property name="no.test" value="true" />
|
|
|
|
</ant>
|
2003-09-18 05:48:49 +02:00
|
|
|
<ant dir="${testdir}" antfile="build/build.xml" target="javadoc" inheritAll="false">
|
2003-08-05 04:37:03 +02:00
|
|
|
<property name="no.test" value="true" />
|
|
|
|
</ant>
|
2003-09-18 05:48:49 +02:00
|
|
|
<ant dir="${testdir}" antfile="build/build.xml" target="clean" inheritAll="false">
|
2003-08-05 04:37:03 +02:00
|
|
|
<property name="no.test" value="true" />
|
|
|
|
</ant>
|
|
|
|
|
|
|
|
<echo>
|
|
|
|
----------------------------
|
|
|
|
...release tests pass, done.
|
|
|
|
----------------------------
|
|
|
|
</echo>
|
2003-01-20 16:57:23 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|