|
Date: 2/4/2008 9:53 am · Subject: Site reset and build scripts · Rating: 1
I've been working on a site reset script (wg_reset) for a while now that doesn't depend on having administrator access to the database to run. It is run from the root of a WebGUI install, accepting a parameter of the WebGUI config file to use. You can also set the environment variable WEBGUI_CONFIG to the name of the config file, and then then you don't have to specify it every time. Without any extra options, it defaults to dev mode. For this, it imports previousVersion.sql, recreates uploads, runs the upgrade scripts, and sets some convenient options for development, like debug mode. You can also specify --build, and it will create a site suitable for exporting as a WebGUI install build. Another option is --test, where it just recreates the site using create.sql. There are lots of other options, look at the source to see them as the documentation is currently rather poor. By default, it doesn't output anything (except in build mode). Use the --verbose option to get information on what it does to the site. I also created a different build script (wg_build) that will create the create.sql file, and can also import the uploads directory from a site into subversion. This one is mainly for me, but others might find it useful or interesting. Both scripts are in svn under tools. Any feedback is welcome.
|