bgneal@33: from fabric.api import cd, env, local, put, run bgneal@33: bgneal@33: bgneal@36: def update(): bgneal@33: """ bgneal@36: Runs hg pull -u. bgneal@33: bgneal@33: """ bgneal@33: with cd('/home/var/django-sites/bns/bns/'): bgneal@36: run('hg pull -u') bgneal@33: bgneal@33: bgneal@33: def collectstatic(): bgneal@33: """ bgneal@33: Runs the staticfiles collectstatic command to deploy static assets. bgneal@33: bgneal@33: """ bgneal@33: cmd = ('. ./env.bash && python manage.py collectstatic ' bgneal@33: '--settings=settings.production --noinput') bgneal@33: bgneal@33: with cd('/home/var/django-sites/bns/bns/bns_website/'): bgneal@33: run(cmd) bgneal@33: bgneal@33: bgneal@33: def touch(): bgneal@33: """ bgneal@33: Touches the wsgi file to reload the Python code. bgneal@33: bgneal@33: """ bgneal@33: with cd('/home/var/django-sites/bns/bns/bns_website/'): bgneal@33: run('touch apache/bns.wsgi')