2002/05/14 18:36:51
[org.ibex.core.git] / build.xml
index 3b09121..ad6fcea 100644 (file)
--- a/build.xml
+++ b/build.xml
         <ant dir="." antfile="src/org/xwt/plat/${plat}.xml" target="build"/>
     </target>
 
-    <target name="dist" depends="compile,build">
-
-        <mkdir dir="www/html/dist/"/>
-
-        <zip update="true" zipfile="www/html/demo.xwar" basedir="src" includes="org/xwt/demo/**,xwt/standard/**,org/xwt/themes/**"/>
-        <zip update="true" zipfile="www/html/demo.xwar" basedir="src/org/xwt/demo/" includes="main.xwt"/>
-
-        <zip update="true" zipfile="www/html/chess.xwar" basedir="src" includes="org/xwt/chess/**,xwt/standard/**,org/xwt/themes/**"/>
-        <zip update="true" zipfile="www/html/chess.xwar" basedir="src/org/xwt/chess/" includes="main.xwt"/>
-
-        <zip update="true" zipfile="www/html/mail.xwar" basedir="src"
-             includes="org/xwt/mail/**,xwt/standard/**,org/xwt/themes/**,org/gimp/tigert/**,org/xwt/fonts/**"
-             excludes="org/xwt/mail/main.xwt"
-             />
-        <zip update="true" zipfile="www/html/mail.xwar" basedir="src/org/xwt/mail/" includes="main.xwt"/>
-
-        <ant dir="." antfile="src/org/xwt/plat/${plat}.xml" target="dist"/>
-
-    </target>
-
     <target name="run" depends="compile,build">
         <ant dir="." antfile="src/org/xwt/plat/${plat}.xml" target="run"/>
     </target>
         <uptodate property="javasrc_ok" targetfile="www/html/javasrc/index.html">
             <srcfiles dir= "src/" includes="**/*.java"/>
         </uptodate>
-        <antcall target="genjavadoc"/>
-        <antcall target="genjavasrc"/>
         <bash>
             # throw on the prefix/suffix where needed
             for A in `find www/html -name \*.html_`
         </bash>
     </target>
 
-    <target name="compile-server">
-        <mkdir dir="www/webapps/classes/"/>
-        <mkdir dir="www/webapps/lib/"/>
-        <javac destdir="www/webapps/classes/" deprecation="no">
-            <src path="www/src/"/>
-            <classpath refid="classpath"/>
-        </javac>
-    </target>
-
     <target name="staging">
         <property name="staging-flag" value="-Dstaging"/>
         <property name="host" value="xwt-staging.org"/>
     </target>
 
     <target name="production">
+        <antcall target="genjavadoc"/>
+        <antcall target="genjavasrc"/>
         <property name="staging-flag" value=""/>
         <property name="host" value="xwt.org"/>
         <antcall target="really-push"/>
     </target>
 
+    <target name="newbuild" depends="compile">
+        <taskdef name="build-id" classname="org.xwt.tasks.BuildIdTask">
+            <classpath path="bin/"/>
+        </taskdef>
+        <build-id/>
+        <bash> cvs commit -m "automatically updated build-id via org.xwt.tasks.BuildIdTask" build.properties </bash>
+        <property file="build.properties"/>
+        
+        <mkdir dir="www/html/dist/"/>
+
+        <!-- rebuild distributions -->
+        <property name="plat" value="Win32"/>
+        <ant dir="." antfile="src/org/xwt/plat/Win32.xml" target="build"/>
+        <ant dir="." antfile="src/org/xwt/plat/Win32.xml" target="dist"/>
+        <property name="plat" value="Java2"/>
+        <ant dir="." antfile="src/org/xwt/plat/Java12.xml" target="build"/>
+        <ant dir="." antfile="src/org/xwt/plat/Java12.xml" target="dist"/>
+
+        <!-- sign stuff -->
+        <bash> /home/megacz/bin/sign/sign ${build-id} </bash>
+    </target>
+
     <!-- required packages: bind, apache, libapache-mod-ssl, libapache-mod-jk, sshd, rsync, j2sdk, tomcat, gnuchess -->
     <target name="really-push" depends="compile,www">
 
+        <!-- update demo xwars -->
+        <zip update="true" zipfile="www/html/demo.xwar" basedir="src" includes="org/xwt/demo/**,xwt/standard/**,org/xwt/themes/**"/>
+        <zip update="true" zipfile="www/html/demo.xwar" basedir="src/org/xwt/demo/" includes="main.xwt"/>
+        <zip update="true" zipfile="www/html/chess.xwar" basedir="src" includes="org/xwt/chess/**,xwt/standard/**,org/xwt/themes/**"/>
+        <zip update="true" zipfile="www/html/chess.xwar" basedir="src/org/xwt/chess/" includes="main.xwt"/>
+        <zip update="true" zipfile="www/html/mail.xwar" basedir="src"
+             includes="org/xwt/mail/**,xwt/standard/**,org/xwt/themes/**,org/gimp/tigert/**,org/xwt/fonts/**"
+             excludes="org/xwt/mail/main.xwt"
+             />
+        <zip update="true" zipfile="www/html/mail.xwar" basedir="src/org/xwt/mail/" includes="main.xwt"/>
+
+        <mkdir dir="www/webapps/classes/"/>
         <copy todir="www/webapps/classes/">
             <fileset dir="bin/" includes="org/xwt/server/**"/>
         </copy>
         <bash>
             # tidy up and rsync our changes
             find www/html -name \*~ | xargs rm -f
-            rsync -Pv --delete -rze ssh www/ root@${host}:/xwt-new/www/
+            rsync -Pv --delete --exclude=html/dist/\* -rze ssh www/ root@${host}:/xwt-new/www/
+            rsync -u -Pv -rze ssh www/html/dist/ root@${host}:/xwt-new/www/html/dist/
         </bash>
 
         <bash host="root@${host}">
 
             /sbin/start-stop-daemon --start --pidfile /var/log/xwt/apache.pid --exec /usr/sbin/apache -- -f /xwt/www/etc/httpd.conf ${staging-flag}
         </bash>
-
     </target>