X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3e82fe190f3d1fbfb7300a98ff1a3a0497d9e237..ba46584ba1bd306df82584cc14c93307e371d7ed:/deployment/base.py diff --git a/deployment/base.py b/deployment/base.py index 54333259..0478f2e2 100644 --- a/deployment/base.py +++ b/deployment/base.py @@ -1,4 +1,7 @@ -from fabric.api import env +# -*- coding: utf-8 -*- +import os + +from fabric.api import env, require from fabric.tasks import Task from fnpdjango.deploy import Command @@ -14,12 +17,17 @@ class Environment(Task): def run(self, *args, **kwargs): env.project_name = 'redakcja' env.hosts = [self.host] - for k,v in self.env_vars.items(): + for k, v in self.env_vars.items(): env[k] = v - build_cmd = '../../ve/bin/python manage.py build --npm-bin=%s' % self.npm_bin + require('app_path') + + build_cmd = '../../ve/bin/python manage.py build --npm-bin=%s --editor-npm-env=%s' \ + % (self.npm_bin, os.path.join(env['app_path'], 'npm_env')) if 'node_bin_path' in self.env_vars: build_cmd += ' --node-bin-path=%s' % self.env_vars['node_bin_path'] + if 'editor_optimize' in self.env_vars: + build_cmd += ' --editor-optimize=%s' % self.env_vars['editor_optimize'] env.pre_collectstatic = [ Command([build_cmd], '')