plainblack.com
Username Password
search
Bookmark and Share

    

Site reset and build scripts

User Graham
Date 2/4/2008 9:53 am
Views 3054
Rating 10    Rate [
|
]
Previous · Next
User Message
Graham

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.



Back to Top
Rate [
|
]
 
 
dionak

Thanks Graham,

I had an issue with the db connection when briefly trying this today but it may be a local issue. Thanks for sharing this. It's helpful to see how WG developers are resetting the db.

Diona 

----
Knowmad Technologies
http://www.knowmad.com



Back to Top
Rate [
|
]
 
 
    



© 2019 Plain Black Corporation | All Rights Reserved