2002/05/16 04:08:01
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:47:12 +0000 (06:47 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:47:12 +0000 (06:47 +0000)
darcs-hash:20040130064712-2ba56-73ae957ace1282964bdd8a95c6744ad2aaf7df11.gz

build.xml

index ad6fcea..4dbd098 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -7,7 +7,7 @@
     <property name="build.compiler" value="jikes"/>
     <property environment="env"/>
 
-    <!-- the hostname of a cygwin machine running sshd; used for .cab-signing and running Win32 binaries -->
+    <!-- the hostname of a cygwin machine running sshd; used for running Win32 binaries -->
     <property name="cygwin-host" value="vmware"/>
 
     <!-- a path on ${cygwin-host} which maps to the root of this XWT tree; usually exported from the build machine using samba -->
     </target>
 
     <!-- rebuild the www/ area -->
-    <target name="www" depends="compile">
+    <target name="staging">
+        <property name="staging-flag" value="-Dstaging"/>
+        <property name="host" value="xwt-staging.org"/>
+        <antcall target="really-push"/>
+    </target>
+
+    <target name="production">
         <mkdir dir="www/html/javadoc/"/>
         <mkdir dir="www/html/javasrc/"/>
         <uptodate property="javadoc_ok" targetfile="www/html/javadoc/index.html">
         <uptodate property="javasrc_ok" targetfile="www/html/javasrc/index.html">
             <srcfiles dir= "src/" includes="**/*.java"/>
         </uptodate>
-        <bash>
-            # throw on the prefix/suffix where needed
-            for A in `find www/html -name \*.html_`
-            do (cat www/html/prefix.html; cat $A; cat www/html/suffix.html; cat "$A"_ 2>/dev/null; cat www/html/tagline.html) > `echo $A | sed s/_\$//g`
-            done
-        </bash>
-    </target>
-
-    <target name="staging">
-        <property name="staging-flag" value="-Dstaging"/>
-        <property name="host" value="xwt-staging.org"/>
-        <antcall target="really-push"/>
-    </target>
-
-    <target name="production">
         <antcall target="genjavadoc"/>
         <antcall target="genjavasrc"/>
         <property name="staging-flag" value=""/>
         <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"/>
-
+<!--
+        <property name="plat" value="Linux"/>
+        <ant dir="." antfile="src/org/xwt/plat/Linux.xml" target="build"/>
+        <ant dir="." antfile="src/org/xwt/plat/Linux.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">
+    <target name="really-push" depends="compile">
 
         <!-- update demo xwars -->
         <zip update="true" zipfile="www/html/demo.xwar" basedir="src" includes="org/xwt/demo/**,xwt/standard/**,org/xwt/themes/**"/>
              excludes="org/xwt/mail/main.xwt"
              />
         <zip update="true" zipfile="www/html/mail.xwar" basedir="src/org/xwt/mail/" includes="main.xwt"/>
+        <zip update="true" zipfile="www/html/k5.xwar" basedir="src" includes="xwt/**,org/xwt/themes/**,org/gimp/**,org/xwt/x5t/**"/>
+        <zip update="true" zipfile="www/html/k5.xwar" basedir="src/org/xwt/x5t/" includes="main.xwt"/>
 
         <mkdir dir="www/webapps/classes/"/>
         <copy todir="www/webapps/classes/">
             <fileset dir="bin/" includes="org/xwt/server/**"/>
         </copy>
 
+        <bash>
+            # throw on the prefix/suffix where needed
+            for A in `find www/html -name \*.html_`
+            do (cat www/html/prefix.html; cat $A; cat www/html/suffix.html; cat "$A"_ 2>/dev/null; cat www/html/tagline.html) > `echo $A | sed s/_\$//g`
+            done
+        </bash>
+
         <bash host="root@${host}">
             # first, clone the currently running copy of xwt, so we can use rsync to save bandwidth
             rm -rf /xwt-new
             /sbin/start-stop-daemon --stop --pidfile /var/log/xwt/apache.pid --exec /usr/sbin/apache
             /sbin/start-stop-daemon --stop --pidfile /var/log/xwt/tomcat.pid --user www-data
 
-            rm -rf /xwt-old
-            mv /xwt /xwt-old
+            rm -rf /xwt-`date +%d-%b-%H:%M`
+            mv /xwt /xwt-`date +%d-%b-%H:%M`
             mv /xwt-new /xwt
+            find /xwt-* -prune -type d -mtime +10 | xargs rm -rf
 
             mkdir /var/log/xwt &amp;>/dev/null
             chown www-data /var/log/xwt/