You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by am...@apache.org on 2010/01/21 03:00:25 UTC

svn commit: r901498 - in /cayenne/site/trunk/tlp-site/bin: deployJavadoc.sh site-sync

Author: amaniatis
Date: Thu Jan 21 02:00:22 2010
New Revision: 901498

URL: http://svn.apache.org/viewvc?rev=901498&view=rev
Log:
Clean up site deployment script and add a new Javadoc deployment script which pulls content from Hudson.

Added:
    cayenne/site/trunk/tlp-site/bin/deployJavadoc.sh   (with props)
Modified:
    cayenne/site/trunk/tlp-site/bin/site-sync

Added: cayenne/site/trunk/tlp-site/bin/deployJavadoc.sh
URL: http://svn.apache.org/viewvc/cayenne/site/trunk/tlp-site/bin/deployJavadoc.sh?rev=901498&view=auto
==============================================================================
--- cayenne/site/trunk/tlp-site/bin/deployJavadoc.sh (added)
+++ cayenne/site/trunk/tlp-site/bin/deployJavadoc.sh Thu Jan 21 02:00:22 2010
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# This script will check the Apache Hudson server for a new
+# version of the Cayenne javadocs.
+# If a newer version is found, the full documentation will be deployed to
+# the Apache Cayenne website.
+
+# To run with crontab, use something like this.
+# 30 0 * * 1 $HOME/deploy_dev_docs.sh >> $HOME/deploy_dev_docs.log 2>&1
+# This will run the script every Monday 30 minutes past midnight (server time),
+# and all output from the script will be appended to the log file.
+
+# Parameters
+DEPLOY_DIR="/www/cayenne.apache.org"
+JAVADOC_SOURCE="http://hudson.zones.apache.org/hudson/job"
+
+GROUP="cayenne"
+
+# Applications
+WGET="/usr/local/bin/wget --no-parent -N -l inf -r --no-host-directories --cut-dirs=4 -p --reject robots.txt -nv -e robots=off"
+
+# Get the html
+cd $DEPLOY_DIR/doc/api
+$WGET $JAVADOC_SOURCE/Cayenne-doc/javadoc
+
+cd $DEPLOY_DIR/doc30/api
+$WGET $JAVADOC_SOURCE/Cayenne-doc30/javadoc
+
+# Throw away pages with search parameters, since we can't tell wget to ignore them
+rm -f $DEPLOY_DIR/doc/api/index.html\?*
+rm -f $DEPLOY_DIR/doc30/api/index.html\?*
+
+# Fix ownership and permissions
+chmod -R a=xr,ug+w $DEPLOY_DIR/doc/api
+chgrp -R $GROUP $DEPLOY_DIR/doc/api
+
+chmod -R a=xr,ug+w $DEPLOY_DIR/doc30/api
+chgrp -R $GROUP $DEPLOY_DIR/doc30/api
+

Propchange: cayenne/site/trunk/tlp-site/bin/deployJavadoc.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: cayenne/site/trunk/tlp-site/bin/site-sync
URL: http://svn.apache.org/viewvc/cayenne/site/trunk/tlp-site/bin/site-sync?rev=901498&r1=901497&r2=901498&view=diff
==============================================================================
--- cayenne/site/trunk/tlp-site/bin/site-sync (original)
+++ cayenne/site/trunk/tlp-site/bin/site-sync Thu Jan 21 02:00:22 2010
@@ -1,38 +1,44 @@
 #!/usr/local/bin/bash
 
+RSYNC="/usr/local/bin/rsync -r"
+CONF_SRC="/www/confluence-exports"
+WWW_DEST="/www/cayenne.apache.org"
+
 # CAYSITE goes to root
-/usr/local/bin/rsync -r /www/confluence-exports/CAYSITE/ /www/cayenne.apache.org
+$RSYNC $CONF_SRC/CAYSITE/ $WWW_DEST
 
 # Doc spaces go in separate directories
-/usr/local/bin/rsync -r /www/confluence-exports/CAYDOC/ /www/cayenne.apache.org/doc
-/usr/local/bin/rsync -r /www/confluence-exports/CAYDOC12/ /www/cayenne.apache.org/doc12
-/usr/local/bin/rsync -r /www/confluence-exports/CAYDOC20/ /www/cayenne.apache.org/doc20
+$RSYNC $CONF_SRC/CAYDOC/ $WWW_DEST/doc
+$RSYNC $CONF_SRC/CAYDOC12/ $WWW_DEST/doc12
+$RSYNC $CONF_SRC/CAYDOC20/ $WWW_DEST/doc20
+$RSYNC $CONF_SRC/CAYDOC30/ $WWW_DEST/doc30
 /usr/local/bin/rsync -r /www/confluence-exports/CAYDOC30/ /www/cayenne.apache.org/doc30
 
 # Manually remove pages deleted from Confluence as they still reside on the Confluence autoexport server
-rm /www/cayenne.apache.org/persistence-caching-and-mapping-for-java.html
-rm /www/cayenne.apache.org/subversion-access.html
+rm $WWW_DEST/persistence-caching-and-mapping-for-java.html
+rm $WWW_DEST/subversion-access.html
 
-rm /www/cayenne.apache.org/doc/acknowledgments.html
-rm /www/cayenne.apache.org/doc/cayennemodeler-and-eclipse.html
-rm /www/cayenne.apache.org/doc/customizing.html
-rm /www/cayenne.apache.org/doc/requirements.html
-rm /www/cayenne.apache.org/doc/user-guide.html
-rm /www/cayenne.apache.org/doc/dataview-concepts.html
-rm /www/cayenne.apache.org/doc/dataviews-in-action.html
-rm /www/cayenne.apache.org/doc/dataviews.html
-rm /www/cayenne.apache.org/doc/dvmodeler-gui-tool.html
-rm /www/cayenne.apache.org/doc/swing-applications.html
-rm -rf /www/cayenne.apache.org/doc/dataview-concepts.data/
-rm -rf /www/cayenne.apache.org/doc/swing-applications.data
+rm $WWW_DEST/doc/acknowledgments.html
+rm $WWW_DEST/doc/cayennemodeler-and-eclipse.html
+rm $WWW_DEST/doc/customizing.html
+rm $WWW_DEST/doc/requirements.html
+rm $WWW_DEST/doc/user-guide.html
+rm $WWW_DEST/doc/dataview-concepts.html
+rm $WWW_DEST/doc/dataviews-in-action.html
+rm $WWW_DEST/doc/dataviews.html
+rm $WWW_DEST/doc/dvmodeler-gui-tool.html
+rm $WWW_DEST/doc/swing-applications.html
+rm -rf $WWW_DEST/doc/dataview-concepts.data/
+rm -rf $WWW_DEST/doc/swing-applications.data
 
 # Link rewriting:
 #  * Fix relative links - confluence space is always one level deep, so use -depth 1
 #  * Rename CAYDOC -> doc
-find /www/cayenne.apache.org/ -depth 1 -name "*.html" |xargs perl -n -i -e 's/\.\.\/CAYDOC/doc/g; print;'
-find /www/cayenne.apache.org/ -depth 2 -name "*.html" |xargs perl -n -i -e 's/\/CAYDOC/\/doc/g; print;'
+find $WWW_DEST/ -depth 1 -name "*.html" |xargs perl -n -i -e 's/\.\.\/CAYDOC/doc/g; print;'
+find $WWW_DEST/ -depth 2 -name "*.html" |xargs perl -n -i -e 's/\/CAYDOC/\/doc/g; print;'
+
 # News are at level 4, so there should be no conflict with the rules above
-find /www/cayenne.apache.org/ -depth 1 -type d |grep "20[0-9][0-9]$" |xargs find |grep "\.html$" |xargs perl -n -i -e 's/\/CAYDOC/\/doc/g; print;'
+find $WWW_DEST/ -depth 1 -type d |grep "20[0-9][0-9]$" |xargs find |grep "\.html$" |xargs perl -n -i -e 's/\/CAYDOC/\/doc/g; print;'
 
 # References to CAYSITE from CAYDOC*
-find /www/cayenne.apache.org/ -depth 2 -name "*.html" |xargs perl -n -i -e 's/\.\.\/CAYSITE/../g; print;'
+find $WWW_DEST/ -depth 2 -name "*.html" |xargs perl -n -i -e 's/\.\.\/CAYSITE/../g; print;'