X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=build.xml;h=98fac385ba317abe163cec6d847e5edd8a025bfc;hb=56c859f1fbf172d3a639b914490295bae5827b3b;hp=79980cd2146e89c4dbe493efad6e481bae33672c;hpb=60f40e150ac55307928546dcfb2717489aca4cbb;p=org.ibex.core.git
diff --git a/build.xml b/build.xml
index 79980cd..98fac38 100644
--- a/build.xml
+++ b/build.xml
@@ -7,7 +7,7 @@
-
+
@@ -71,32 +71,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -107,55 +93,114 @@
-
- # 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
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+ cvs commit -m "automatically updated build-id via org.xwt.tasks.BuildIdTask" build.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /home/megacz/bin/sign/sign ${build-id}
-
-
+
+
- find www/html -name \*~ | xargs rm -f
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# throw on the prefix/suffix where needed
- rm -f /tmp/delete-$$
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`
- echo $A | sed s/_\$//g >> /tmp/delete-$$
done
+
- # in theory, we should be able to slam a fully-functional
- # copy of the xwt server onto any debian machine with the
- # right packages preinstalled (roughly: bind, apache, libapache-mod-ssl
- # apache-ssl, sshd, rsync, j2sdk, tomcat)
-
+
# first, clone the currently running copy of xwt, so we can use rsync to save bandwidth
- ssh root@xwt.org "rm -rf /xwt-new; mkdir -p /xwt; mkdir -p /xwt-new; cd /xwt; tar cf - . | tar xf - -C /xwt-new"
+ rm -rf /xwt-new
+ mkdir -p /xwt
+ mkdir -p /xwt-new
+ cd /xwt
+ tar cf - . | tar xf - -C /xwt-new
+
+
+
+ # 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/
+
+
+
- # now, rsync to process our changes
- rsync -Pv --delete -rze ssh www/ root@xwt.org:/xwt-new/www/
+ # stop services
+ /etc/init.d/xwt-cluster stop
- # clean up generated html
- cat /tmp/delete-$$ | xargs rm
- rm -f /tmp/delete-$$
+ 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/
+
+ ln -s /xwt/www/webapps /xwt/www/webapps/ROOT
+ 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
- # stop services, clean up, transfer control, and restart services
- ssh root@xwt.org "chmod +x /xwt-new/www/bounce.sh; /xwt-new/www/bounce.sh"
+ test ${host} == "xwt-staging.org" && echo -e "User-agent: *\nDisallow: /\n" > /xwt/www/html/robots.txt
+ echo ${staging-flag} > /xwt/staging-flag
+
+ /etc/init.d/xwt-cluster start
+
+