annotate fabfile.py @ 204:f6c1723fec1d

Update copyright banner.
author Brian Neal <bgneal@gmail.com>
date Sun, 06 Nov 2022 17:38:09 -0600
parents 8a93b1f838f9
children
rev   line source
bgneal@58 1 from fabric.api import cd, run
bgneal@58 2
bgneal@99 3 PYTHON = '/svr/django-sites/madeira/bin/python'
bgneal@99 4 WC_DIR = '/svr/django-sites/madeira/madeira'
bgneal@74 5 PROJ_DIR = WC_DIR
bgneal@58 6
bgneal@58 7 def update():
bgneal@58 8 """
bgneal@58 9 Runs hg pull --update to pull changes and update to them.
bgneal@58 10
bgneal@58 11 """
bgneal@58 12 with cd(PROJ_DIR):
bgneal@58 13 run('hg pull --update')
bgneal@58 14
bgneal@58 15
bgneal@58 16 def collectstatic():
bgneal@58 17 """
bgneal@58 18 Runs the staticfiles collectstatic command to deploy static assets.
bgneal@58 19
bgneal@58 20 """
bgneal@58 21 cmd = ('%s manage.py collectstatic '
bgneal@74 22 '--settings=madeira.settings.production --noinput') % PYTHON
bgneal@58 23
bgneal@58 24 with cd(PROJ_DIR):
bgneal@58 25 run(cmd)
bgneal@58 26
bgneal@58 27
bgneal@58 28 def cleanup():
bgneal@58 29 """
bgneal@168 30 Runs any/all cleanup-type management commands.
bgneal@58 31
bgneal@58 32 """
bgneal@168 33 cmd = '%s manage.py clearsessions --settings=madeira.settings.production' % PYTHON
bgneal@58 34
bgneal@58 35 with cd(PROJ_DIR):
bgneal@58 36 run(cmd)
bgneal@58 37
bgneal@58 38
bgneal@58 39 def touch():
bgneal@58 40 """
bgneal@58 41 Touches the wsgi file to reload the Python code.
bgneal@58 42
bgneal@58 43 """
bgneal@58 44 with cd(PROJ_DIR):
bgneal@77 45 run('touch madeira/apache/madeira.wsgi')