# Path: shipwright/_lib/msg.py
# class BuildComplete(Message, namedtuple('BuildComplete', ['target'])):
#     """
#     A message to signify that the build has finished for a target.
# 
#     The build may not have completed succesfully
#     """


from . import build, dependencies
from .msg import BuildComplete
        ref = this_ref_str
        tags = self.source_control.default_tags() + self.tags + [this_ref_str]
        for evt in build.do_build(client, ref, targets, self._cache):
            if isinstance(evt, BuildComplete):
                target = evt.target
                for tag_evt in self._cache.tag([target], tags):
                    yield tag_evt
            yield evt

    def images(self, build_targets):
        for target in dependencies.eval(build_targets, self.targets()):
            yield {
                'stream': '{t.name}:{t.ref}'.format(t=target),
                'event': 'log',
            }

    def push(self, build_targets, no_build=False):
        """
        Pushes the latest images to the repository.
        """
        targets = dependencies.eval(build_targets, self.targets())
        this_ref_str = self.source_control.this_ref_str()
        tags = self.source_control.default_tags() + self.tags + [this_ref_str]

        if no_build:
            for evt in self._cache.push(targets, tags):
                yield evt
            return

        for evt in self._build(this_ref_str, targets):

# Path: shipwright/_lib/msg.py
# class BuildComplete(Message, namedtuple('BuildComplete', ['target'])):
#     """
#     A message to signify that the build has finished for a target.
# 
#     The build may not have completed succesfully
#     """


# Path: shipwright/_lib/base.py
from . import build, dependencies
from .msg import BuildComplete

        ref = this_ref_str
        tags = self.source_control.default_tags() + self.tags + [this_ref_str]
        for evt in build.do_build(client, ref, targets, self._cache):
            if isinstance(evt, BuildComplete):
                target = evt.target
                for tag_evt in self._cache.tag([target], tags):
                    yield tag_evt
            yield evt

    def images(self, build_targets):
        for target in dependencies.eval(build_targets, self.targets()):
            yield {
                'stream': '{t.name}:{t.ref}'.format(t=target),
                'event': 'log',
            }

    def push(self, build_targets, no_build=False):
        """
        Pushes the latest images to the repository.
        """
        targets = dependencies.eval(build_targets, self.targets())
        this_ref_str = self.source_control.this_ref_str()
        tags = self.source_control.default_tags() + self.tags + [this_ref_str]

        if no_build:
            for evt in self._cache.push(targets, tags):
                yield evt
            return

        for evt in self._build(this_ref_str, targets):

            if isinstance(evt, BuildComplete):