Mercurial > public > sg101
comparison fabfile.py @ 531:1f92a53db575
Adding a fabric file.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 23 Dec 2011 23:11:45 +0000 |
parents | |
children | cb298c8eb039 |
comparison
equal
deleted
inserted
replaced
530:06baec10cd20 | 531:1f92a53db575 |
---|---|
1 from fabric.api import cd, run | |
2 | |
3 PYTHON = '/home/var/django-sites/virtualenvs/sg101/bin/python' | |
4 WC_DIR = '/home/var/django-sites/virtualenvs/sg101/sg101' | |
5 PROJ_DIR = WC_DIR + '/gpp' | |
6 | |
7 def update(): | |
8 """ | |
9 Runs svn update. | |
10 | |
11 """ | |
12 with cd(PROJ_DIR): | |
13 run('svn up') | |
14 | |
15 | |
16 def collectstatic(): | |
17 """ | |
18 Runs the staticfiles collectstatic command to deploy static assets. | |
19 | |
20 """ | |
21 cmd = ('%s manage.py collectstatic ' | |
22 '--settings=settings.production --noinput') % PYTHON | |
23 | |
24 with cd(PROJ_DIR): | |
25 run(cmd) | |
26 | |
27 | |
28 def touch(): | |
29 """ | |
30 Touches the wsgi file to reload the Python code. | |
31 | |
32 """ | |
33 with cd(PROJ_DIR): | |
34 run('touch apache/sg101.wsgi') |