Author: lukaszlenart Date: Thu Jun 13 05:56:31 2013 New Revision: 1492531 URL: http://svn.apache.org/r1492531 Log: INFRA-6350 Prepares script to periodically update Draft Docs
Added: struts/site/trunk/README struts/site/trunk/build_cms.sh struts/site/trunk/scripts/ struts/site/trunk/scripts/update-draft-docs.sh Added: struts/site/trunk/README URL: http://svn.apache.org/viewvc/struts/site/trunk/README?rev=1492531&view=auto ============================================================================== --- struts/site/trunk/README (added) +++ struts/site/trunk/README Thu Jun 13 05:56:31 2013 @@ -0,0 +1,7 @@ +This project is used to update main Apache Struts website http://struts.apache.org/ +On each commit site is rebuild and available at http://struts.staging.apache.org/ +You must manually push changes to production via CMS. + +Site is generated by Maven and uses xdoc either markdown format. + +There is also additional build_cms.sh script used right now only to update Draft docs available http://struts.apache.org/development/2.x/ Added: struts/site/trunk/build_cms.sh URL: http://svn.apache.org/viewvc/struts/site/trunk/build_cms.sh?rev=1492531&view=auto ============================================================================== --- struts/site/trunk/build_cms.sh (added) +++ struts/site/trunk/build_cms.sh Thu Jun 13 05:56:31 2013 @@ -0,0 +1,4 @@ +#!/bin/sh + +# Update draft docs +scripts/update-draft-docs.sh Added: struts/site/trunk/scripts/update-draft-docs.sh URL: http://svn.apache.org/viewvc/struts/site/trunk/scripts/update-draft-docs.sh?rev=1492531&view=auto ============================================================================== --- struts/site/trunk/scripts/update-draft-docs.sh (added) +++ struts/site/trunk/scripts/update-draft-docs.sh Thu Jun 13 05:56:31 2013 @@ -0,0 +1,37 @@ +#!/bin/sh + +# This script is used to periodically update Development version of docs - Draft docs +# The docs are available here http://struts.apache.org/development/2.x/docs/ + +svn co https://svn.apache.org/repos/infra/websites/production/struts/content/development/2.x/docs struts2-draft-docs --no-auth-cache + +# Grab docs from Confluence +wget -erobots=off -nH -nv -E -L --directory-prefix=cwiki --no-check-certificate -r https://cwiki.apache.org/WW/ + +# Remove the old docs +rm -R struts2-draft-docs/* + +# Move the new docs +mv cwiki/WW/* struts2-draft-docs/ + +cd struts2-draft-docs + +touch PLACEHOLDER + +# Check for changes +DIFF=`svn status` +if [ -n "$DIFF" ]; then + # echo "Changes detected - add and commit" + # Add all the file + svn add ./ --force + # Commit changes + svn commit -m "Updates draft docs" --no-auth-cache +fi + +cd .. + +# Cleanup +rm -R struts2-draft-docs +rm -R cwiki + +# echo "Success!"