X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=build.xml;h=98fac385ba317abe163cec6d847e5edd8a025bfc;hb=7880e4c4ade5aae671934555eac512704f390d82;hp=4e53a6d733a349a3a4e06fda7bd16b84ec119400;hpb=c9e1bd707806233eefcaa5497a7a99a95ae3da51;p=org.ibex.core.git diff --git a/build.xml b/build.xml index 4e53a6d..98fac38 100644 --- a/build.xml +++ b/build.xml @@ -7,7 +7,7 @@ - + @@ -76,7 +76,13 @@ - + + + + + + + @@ -87,22 +93,10 @@ - - # 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 - - - - - - - - - - + @@ -122,15 +116,19 @@ - - - + + + /home/megacz/bin/sign/sign ${build-id} - + @@ -142,12 +140,21 @@ excludes="org/xwt/mail/main.xwt" /> + + + + # 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 + + # first, clone the currently running copy of xwt, so we can use rsync to save bandwidth rm -rf /xwt-new @@ -160,18 +167,20 @@ # tidy up and rsync our changes find www/html -name \*~ | xargs rm -f + rm www/html/tmp.[0-9] 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/ + # stop services - /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 + /etc/init.d/xwt-cluster stop - 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 &>/dev/null chown www-data /var/log/xwt/ @@ -180,22 +189,14 @@ ln -s /xwt/www/webapps /xwt/www/webapps/WEB-INF ln -s /xwt/www/launch /xwt/www/launch/ROOT ln -s /xwt/www/launch /xwt/www/launch/WEB-INF + ln -s /xwt/www/wiki /xwt/www/wiki/ROOT + ln -s /xwt/www/wiki /xwt/www/wiki/WEB-INF - export JAVA_HOME=/usr/lib/j2sdk1.3 - export CLASSPATH=$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/tools.jar:/usr/share/tomcat/classes:/usr/share/tomcat/lib/tomcat.jar - - touch /var/log/xwt/tomcat.log - chown www-data /var/log/xwt/tomcat.log - test ${host} == "xwt-staging.org" && echo -e "User-agent: *\nDisallow: /\n" > /xwt/www/html/robots.txt + echo ${staging-flag} > /xwt/staging-flag - /sbin/start-stop-daemon \ - --start --pidfile /var/log/xwt/tomcat.pid --make-pidfile --chuid www-data --exec \ - /usr/lib/j2sdk1.3/bin/java -- -server -Dtomcat.home=/usr/share/tomcat -Xmx500M \ - org.apache.tomcat.startup.Main -config /xwt/www/etc/server.xml start \ - >> /var/log/xwt/tomcat.log 2>&1 & + /etc/init.d/xwt-cluster start - /sbin/start-stop-daemon --start --pidfile /var/log/xwt/apache.pid --exec /usr/sbin/apache -- -f /xwt/www/etc/httpd.conf ${staging-flag}