X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/016f7647a05ad25e9d058b70f58f99ce5fa7d1a0..ba6fd3dfb0d3241d4ce85fa43cd6e760d17db948:/fabfile.py diff --git a/fabfile.py b/fabfile.py index a936eb29..eba8f1f8 100644 --- a/fabfile.py +++ b/fabfile.py @@ -70,6 +70,7 @@ def deploy(): copy_localsettings() symlink_current_release() migrate() + django_compress() restart_webserver() def deploy_version(version): @@ -152,6 +153,14 @@ def migrate(): run('../../../bin/python manage.py syncdb --noinput' % env, pty = True) if env.use_south: run('../../../bin/python manage.py migrate' % env, pty = True) + +def django_compress(): + "Update static files" + print '>>> migrate' + require('project_name', provided_by = [staging, production]) + with cd('%(path)s/releases/current/%(project_name)s' % env): + run('../../../bin/python manage.py synccompress --force' % env, pty = True) + def restart_webserver(): "Restart the web server"