# HG changeset patch # User Brian Neal # Date 1324681905 0 # Node ID 1f92a53db575336ad19bff6a61fa2fcbb67dd65f # Parent 06baec10cd2023dd0d233f07fb58a3036b74bc42 Adding a fabric file. diff -r 06baec10cd20 -r 1f92a53db575 fabfile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fabfile.py Fri Dec 23 23:11:45 2011 +0000 @@ -0,0 +1,34 @@ +from fabric.api import cd, run + +PYTHON = '/home/var/django-sites/virtualenvs/sg101/bin/python' +WC_DIR = '/home/var/django-sites/virtualenvs/sg101/sg101' +PROJ_DIR = WC_DIR + '/gpp' + +def update(): + """ + Runs svn update. + + """ + with cd(PROJ_DIR): + run('svn up') + + +def collectstatic(): + """ + Runs the staticfiles collectstatic command to deploy static assets. + + """ + cmd = ('%s manage.py collectstatic ' + '--settings=settings.production --noinput') % PYTHON + + with cd(PROJ_DIR): + run(cmd) + + +def touch(): + """ + Touches the wsgi file to reload the Python code. + + """ + with cd(PROJ_DIR): + run('touch apache/sg101.wsgi')