Commit 313621c2 by Timothée Peignier

fix synccompress trouble when using PIPELINE_AUTO=False

parent cd5f1195
...@@ -17,6 +17,7 @@ class Command(NoArgsCommand): ...@@ -17,6 +17,7 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options): def handle_noargs(self, **options):
from pipeline.packager import Packager from pipeline.packager import Packager
packager = Packager( packager = Packager(
sync=True,
force=options.get('force', False), force=options.get('force', False),
verbose=int(options.get('verbosity', 1)) >= 2 verbose=int(options.get('verbosity', 1)) >= 2
) )
......
...@@ -11,9 +11,10 @@ from pipeline.versioning import Versioning ...@@ -11,9 +11,10 @@ from pipeline.versioning import Versioning
class Packager(object): class Packager(object):
def __init__(self, force=False, verbose=False, css_packages=None, js_packages=None): def __init__(self, force=False, sync=False, verbose=False, css_packages=None, js_packages=None):
self.force = force self.force = force
self.verbose = verbose self.verbose = verbose
self.sync = sync
self.compressor = Compressor(verbose) self.compressor = Compressor(verbose)
self.versioning = Versioning(verbose) self.versioning = Versioning(verbose)
self.compiler = Compiler(verbose) self.compiler = Compiler(verbose)
...@@ -49,7 +50,7 @@ class Packager(object): ...@@ -49,7 +50,7 @@ class Packager(object):
return self.compiler.compile(paths) return self.compiler.compile(paths)
def pack(self, package, compress, signal, **kwargs): def pack(self, package, compress, signal, **kwargs):
if settings.PIPELINE_AUTO or self.force: if settings.PIPELINE_AUTO or self.force or self.sync:
need_update, version = self.versioning.need_update( need_update, version = self.versioning.need_update(
package['output'], package['paths']) package['output'], package['paths'])
if need_update or self.force: if need_update or self.force:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment