Add new --pull option in build.

Signed-off-by: Christophe Labouisse <christophe@labouisse.org>
This commit is contained in:
Christophe Labouisse 2015-09-14 15:02:15 +02:00
commit 39786d4da7
5 changed files with 49 additions and 10 deletions

View file

@ -153,9 +153,11 @@ class TopLevelCommand(Command):
Options:
--no-cache Do not use cache when building the image.
--pull Always attempt to pull a newer version of the image.
"""
no_cache = bool(options.get('--no-cache', False))
project.build(service_names=options['SERVICE'], no_cache=no_cache)
pull = bool(options.get('--pull', False))
project.build(service_names=options['SERVICE'], no_cache=no_cache, pull=pull)
def help(self, project, options):
"""