Mercurial > public > sg101
view fabfile.py @ 697:67f8d49a9377
Cleaned up the code a bit.
Separated the S3 stuff out into its own class.
This class maybe should be in core.
Still want to do some kind of context manager around the temporary file we are
creating to ensure it gets deleted.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 08 Sep 2013 21:02:58 -0500 |
parents | d9d6b4b8bab7 |
children |
line wrap: on
line source
from fabric.api import cd, run PYTHON = '/svr/django-sites/sg101/bin/python' PROJ_DIR = '/svr/django-sites/sg101/sg101' def update(): """ Runs hg pull --update to pull changes and update to them. """ with cd(PROJ_DIR): run('hg pull --update') def collectstatic(): """ Runs the staticfiles collectstatic command to deploy static assets. """ cmd = ('%s manage.py collectstatic ' '--settings=sg101.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 ./sg101/apache/sg101.wsgi')