bgneal@531: from fabric.api import cd, run bgneal@531: bgneal@531: PYTHON = '/home/var/django-sites/virtualenvs/sg101/bin/python' bgneal@531: WC_DIR = '/home/var/django-sites/virtualenvs/sg101/sg101' bgneal@531: PROJ_DIR = WC_DIR + '/gpp' bgneal@531: bgneal@531: def update(): bgneal@531: """ bgneal@531: Runs svn update. bgneal@531: bgneal@531: """ bgneal@531: with cd(PROJ_DIR): bgneal@531: run('svn up') bgneal@531: bgneal@531: bgneal@531: def collectstatic(): bgneal@531: """ bgneal@531: Runs the staticfiles collectstatic command to deploy static assets. bgneal@531: bgneal@531: """ bgneal@531: cmd = ('%s manage.py collectstatic ' bgneal@531: '--settings=settings.production --noinput') % PYTHON bgneal@531: bgneal@531: with cd(PROJ_DIR): bgneal@531: run(cmd) bgneal@531: bgneal@531: bgneal@531: def touch(): bgneal@531: """ bgneal@531: Touches the wsgi file to reload the Python code. bgneal@531: bgneal@531: """ bgneal@531: with cd(PROJ_DIR): bgneal@531: run('touch apache/sg101.wsgi')