Dashboard > Wonder > ... > Tutorials > Updating Your Existing Wonder Source and Installation from CVS
  Wonder Log In View a printable version of the current page.  
  Updating Your Existing Wonder Source and Installation from CVS
Added by Kieran Kelleher, last edited by Kieran Kelleher on Jun 27, 2007  (view change)
Labels: 
(None)

Introduction

You want an easy fast way to regularly update your existing Wonder source tree and Wonder installation from CVS. The best way to do this is automate it with a script. Otherwise it becomes a chore and you will tend not to update frequently and hence not benefit from the continuous improvements and bug fixes. I typically update between 1 and 3 times a week.

Prerequisites

Wonder source tree is checked out from CVS: Download Wonder Source, Build and Install

Setup the Update Script

Setup a script in your home folder (I use ~/scripts) that will update your CVS source tree and install latest frameworks while you have a coffee break

Here is the script I use. Examine it and change the WONDER_DIR and MY_USER_NAME variables to suit your situation

#!/bin/bash

# Must be run as root
if [ `whoami` != "root" ]; then
  echo "You must be root to use this!"
  exit 1
fi

# Edit this to reflect your own user name
MY_USER_NAME="kieran"
## This is the path to the dir _containing_ the dir "Wonder"
WONDER_DIR="/Users/$MY_USER_NAME/WonderLatest/"
FRAMEWORKS_DIR="/Library/Frameworks/"


cd $WONDER_DIR

## Keeping a timestamp of when we did the update can be useful
echo initializing log
echo "Start date and time "`date` > install_log.txt

## Update the existing source tree that was previously checked out of CVS
cd Wonder
cvs update -Pd

cd $WONDER_DIR
echo "Download/update completed at "`date` >> install_log.txt

## Set permissions on the source tree
chown -R $MY_USER_NAME:staff Wonder
chmod -R 755 Wonder

## Delete old installed frameworks so we don't end up with 'merged' files having old and new version jars for example
## This is a partial list and is only really important for the ones I am actually using to ensure I get clean updates
cd /Library/Frameworks
rm -r Ajax.framework
rm -r AjaxLook.framework
rm -r DRGrouping.framework
rm -r ERCalendar.framework
rm -r ERCaptcha.framework
rm -r ERChangeNotificationJMS.framework
rm -r ERCoreBusinessLogic.framework
rm -r ERDirectToWeb.framework
rm -r ERExcelLook.framework
rm -r ERExtensions.framework
rm -r ERIMAdaptor.framework
rm -r ERIndexing.framework
rm -r ERJars.framework
rm -r ERJavaMail.framework
rm -r ERJGroupsSynchronizer.framework
rm -r ERMiniUglyLook.framework
rm -r ERNeutralLook.framework
rm -r EROpenID.framework
rm -r ERPlot.framework
rm -r ERPrototypes.framework
rm -r ERRest.framework
rm -r ERWorkerChannel.framework
rm -r ExcelGenerator.framework
rm -r FrontBasePlugIn.framework
rm -r PostgresqlPlugIn.framework
rm -r SVGObjects.framework
rm -r Validity.framework
rm -r WOOgnl.framework
rm -r WOPayPal.framework
rm -r YUI.framework

## now install/update Wonder
cd $WONDER_DIR
cd Wonder

ant clean
ant frameworks
ant frameworks.install

## Build documentation. Creates the JavaDoc API in ../Wonder/dist
## Comment out this line if you don't want the Wonder API docs locally on your hard drive
ant docs


## Delete the frameworks I especially don't want on my hard drive, are obsolete or ones I just never intend to use
# echo deleting unecessary Wonder frameworks
# cd $FRAMEWORKS_DIR
rm -r ERWorkerChannel.framework


cd $WONDER_DIR
echo "Installation completed at "`date` >> install_log.txt

Updating With The Script

  • Simply run the script as root
  • If you have projects linked to your Eclipse workspace (import, no copy), then Eclipse will detect underlying changes to file system and rebuild the appropriate workspace projects. It is a good idea to check for red x's to ensure that recent Wonder changes have not broken your code. Also it is a good idea to run your test suites on projects that depend on Wonder to make sure the latest updates have not affected your code.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators