Developing with Subversion, Unfuddle and OSX

Today I'm going to be helping one of our investment companies, ByteWire set themselves up with a subversion based development environment for their Street Crime game. They will use a straight forward workflow whereby they will develop and test their code locally on their iMacs, commit working code to a subversion repository, and then check out code the live site when they are happy with it.

UNFUDDLE

We're going to be using Unfuddle to provide subversion hosting, project management and bug tracking.

LOCAL DOMAIN ON OSX

Set-up a local test domain on OS X

printf "127.0.0.1\tstreetcrime\n" | sudo tee -a /etc/hosts

MAMP

MAMP is an excellent bundle of Apache, MySQL and PHP for use on Macs. These tools do come pre-installed with Leopard by default, but php in particular is missing a fair few modules which you can only really add by re-compiling - MAMP makes it a lot easier. It installs new versions of PHP, MySQL and Apache alongside the default versions (on different ports), so that both can be run at the same time.

    • Create a folder where the site code will be placed, e.g. /Applications/MAMP/htdocs/streetcrime/http/

    • Open up /Applications/MAMP/conf/apache/httpd.conf with a text editor.

    • Uncomment the NameVirtualHost line, and add a couple of news lines to define the new virtual host. It should look like:

NameVirtualHost *

<VirtualHost *>
DocumentRoot /Applications/MAMP/htdocs/
ServerName localhost
</VirtualHost>

<VirtualHost *>
DocumentRoot /Applications/MAMP/htdocs/streetcrime/http/
ServerName streetcrime
</VirtualHost>

INITIAL COMMIT OF CODE

svn -m '' mkdir http://bytewire.unfuddle.com/svn/bytewire_streetcrime/trunk/
svn co http://bytewire.unfuddle.com/svn/bytewire_streetcrime/trunk/ /sites/street-crime.com/
du -h --max-depth=1 /sites/street-crime.com/http/
svn add /sites/street-crime.com/http/
svn propedit svn:ignore /sites/street-crime.com/http/
PSD
gangster-game-forum
gangster-game-wiki
gangster-game-blog
logs
uploads
svn add --force /sites/street-crime.com/http/
svn commit -m 'Importing main files'

CHECKING OUT CODE TO THE OSX DEVELOPMENT WORKSTATION

cd /Applications/MAMP/htdocs/streetcrime/
rmdir http
svn co http://bytewire.unfuddle.com/svn/bytewire_streetcrime/trunk/ .

TESTING THE SITE

← Back to Blog