You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2003/01/19 06:22:43 UTC

cvs commit: xml-forrest/src/resources/forrestbot/webapp/WEB-INF users.properties

jefft       2003/01/18 21:22:43

  Modified:    src/resources/forrestbot/scripts README.txt overseer
               src/resources/forrestbot/webapp controlpanel.jsp
               src/resources/forrestbot/webapp/WEB-INF users.properties
  Added:       src/resources/forrestbot/scripts publish_livesite
  Removed:     src/resources/forrestbot/scripts update_livesite
  Log:
  Rename the process of committing to xml-site/targets/* from 'update' to
  'publish'.
  
  Revision  Changes    Path
  1.4       +3 -3      xml-forrest/src/resources/forrestbot/scripts/README.txt
  
  Index: README.txt
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/README.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- README.txt	7 Dec 2002 12:54:02 -0000	1.3
  +++ README.txt	19 Jan 2003 05:22:42 -0000	1.4
  @@ -8,12 +8,12 @@
   cron job to generate multiple sites.  Contents are as follows:
   
   launch-overseer          # Convenience script for running 'overseer'.
  -overseer                 # A driver script which is used with the webapp. Invokes 'refresh' and 'update_livesite'
  +overseer                 # A driver script which is used with the webapp.  Invokes 'refresh' and 'publish_livesite'
   refresh                  # Main driver script. Refreshes a single site via a forrestbot script
   refresh_all              # Convenience wrapper for 'refresh' which regens all sites. Suitable for cron use
   local-vars               # Script defining local variables, with defaults. Frontend to local-vars-`uname -n`
   local-vars-`uname -n`    # Script containing local variable definitions. MUST BE DEFINED FOR YOUR SITE
  -update_livesite          # WIP script to commit files to the Apache xml-site/targets/forrest module
  +publish_livesite         # WIP script to commit files to the Apache xml-site/targets/forrest module
   work/                    # Runtime-generated directory containing forrestbot files
   
   Prerequisites
  
  
  
  1.3       +6 -6      xml-forrest/src/resources/forrestbot/scripts/overseer
  
  Index: overseer
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/overseer,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- overseer	7 Dec 2002 12:54:02 -0000	1.2
  +++ overseer	19 Jan 2003 05:22:42 -0000	1.3
  @@ -4,7 +4,7 @@
   # Script to process commands generated by the webapp
   # It listens on stdin for single-line commands of the form:
   # <action> <module>
  -# Eg 'refresh xml-site', 'upload xml-forrest'
  +# Eg 'refresh xml-site', 'publish xml-forrest'
   ###################################################
   
   . `dirname $0`/local-vars
  @@ -23,10 +23,10 @@
   	$BASE/refresh `lookup_script $module` >> $REFRESH_LOG 2>&1
   }
   
  -function upload()
  +function publish()
   {
   	echo "Upload $module"
  -	$BASE/update_livesite $module >> $REFRESH_LOG 2>&1
  +	$BASE/publish_livesite $module >> $REFRESH_LOG 2>&1
   }
   
   while true; do
  @@ -35,8 +35,8 @@
   refresh)
   	refresh $module
   	;;
  -upload)
  -	upload $module
  +publish)
  +	publish $module
   	;;
   quit) exit
   	;;
  @@ -46,7 +46,7 @@
   ;;
   *)
   	echo "Unknown command '$action'"
  -	echo "Available commands are 'refresh', 'upload'."
  +	echo "Available commands are 'refresh', 'publish'."
   	;;
   esac
   done
  
  
  
  1.1                  xml-forrest/src/resources/forrestbot/scripts/publish_livesite
  
  Index: publish_livesite
  ===================================================================
  #!/bin/sh
  
  ###################################################
  # A dubious script which commits generated website
  # contents to xml-site/targets/$MODULE 
  ###################################################
  
  MODULE=${1:-xml-forrest}
  case $MODULE in
  	xml-forrest) TARGET="forrest" ;;
  esac
  [ -z "$TARGET" ] && echo "Unknown module: $MODULE" && exit;
  
  . `dirname $0`/local-vars
  if [ -z "$XML_SITE" ]; then
  	echo "Please set the XML_SITE var in local-vars-`uname -n`"
  	exit
  fi	
  SRC_DIR=$WEBAPP/sites/$MODULE
  if [ ! -d "$SRC_DIR" ]; then
    echo "Expected website contents in $SRC_DIR"
    exit
  fi
  LIVECVS=$XML_SITE/targets/$TARGET
  
  echo "Updating $LIVECVS from $SRC_DIR"
  pushd .
  cd $LIVECVS
  cvsco
  cvs up -dP
  echo "Now copying $SRC_DIR/*"
  cp -r -p $SRC_DIR/* .
  echo "done"
  NEW_FILES=`cvs up | grep '^\?' | cut -d\  -f 2`
  for i in $NEW_FILES; do
    MIME=`file -bi $i`
    echo "New file $i has MIME type $MIME"
    if [ `echo "$MIME" | grep -q 'text'` ]; then
      echo "Adding $i as text"
      cvsdo add $i
    else
      echo "Adding $i as binary"
      cvs add -kb $i
    fi
  done
  cvs up > /tmp/cvslist 2>&1
  cvs ci -m "Automatic publish at `date` by forrestrunner."
  #cvs ci
  popd
  
  
  
  1.3       +2 -2      xml-forrest/src/resources/forrestbot/webapp/controlpanel.jsp
  
  Index: controlpanel.jsp
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/webapp/controlpanel.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- controlpanel.jsp	7 Dec 2002 14:02:13 -0000	1.2
  +++ controlpanel.jsp	19 Jan 2003 05:22:43 -0000	1.3
  @@ -65,8 +65,8 @@
         <% if (hasPriv(privs, "refresh")) { %>
           <input type="submit" name="action" value="refresh">
         <% } %>
  -      <% if (hasPriv(privs, "upload")) { %>
  -        <input type="submit" name="action" value="upload"/>
  +      <% if (hasPriv(privs, "publish")) { %>
  +        <input type="submit" name="action" value="publish"/>
         <% } %>
         <% } else { %>
           <input type="submit" value="login">
  
  
  
  1.3       +1 -1      xml-forrest/src/resources/forrestbot/webapp/WEB-INF/users.properties
  
  Index: users.properties
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/webapp/WEB-INF/users.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- users.properties	7 Dec 2002 14:02:13 -0000	1.2
  +++ users.properties	19 Jan 2003 05:22:43 -0000	1.3
  @@ -1,3 +1,3 @@
   # This file lists users known to the system, and associated 'privileges'.
  -forrest-dev=refresh,xml-forrest,xml-forrest-template,xml-site,incubator-site,xml-xindice,xml-fop.xml,krysalis-centipede
  +forrest-dev=refresh,publish,xml-forrest,xml-forrest-template,xml-site,incubator-site,xml-xindice,xml-fop.xml,krysalis-centipede
   forrest-dev.password=forrest-dev