docs: def do_build(self):
  		"""Runs build phase, building any modules that we've determined
  		need building.
  		"""
  		shutit_global.shutit_global_object.yield_to_draw()
  		cfg = self.cfg
  		self.log('PHASE: build, repository work', level=logging.DEBUG)
  		module_id_list = self.module_ids()
  		if self.build['deps_only']:
  			module_id_list_build_only = filter(lambda x: cfg[x]['shutit.core.module.build'], module_id_list)
  		for module_id in module_id_list:
  			module = self.shutit_map[module_id]
  			self.log('Considering whether to build: ' + module.module_id, level=logging.INFO)
  			if cfg[module.module_id]['shutit.core.module.build']:
  				if self.build['delivery'] not in module.ok_delivery_methods:
  					self.fail('Module: ' + module.module_id + ' can only be built with one of these --delivery methods: ' + str(module.ok_delivery_methods) + '\nSee shutit build -h for more info, or try adding: --delivery <method> to your shutit invocation') # pragma: no cover
  				if self.is_installed(module):
  					self.build['report'] = (self.build['report'] + '\nBuilt already: ' + module.module_id + ' with run order: ' + str(module.run_order))
  				else:
  					# We move to the module directory to perform the build, returning immediately afterwards.
  					if self.build['deps_only'] and module_id == module_id_list_build_only[-1]:
  						# If this is the last module, and we are only building deps, stop here.
  						self.build['report'] = (self.build['report'] + '\nSkipping: ' + module.module_id + ' with run order: ' + str(module.run_order) + '\n\tas this is the final module and we are building dependencies only')
  					else:
  						revert_dir = os.getcwd()
  						self.get_current_shutit_pexpect_session_environment().module_root_dir = os.path.dirname(self.shutit_file_map[module_id])
  						self.chdir(self.get_current_shutit_pexpect_session_environment().module_root_dir)
  						self.login(prompt_prefix=module_id,command=shutit_global.shutit_global_object.bash_startup_command,echo=False)
  						self.build_module(module)
  						self.logout(echo=False)
  						self.chdir(revert_dir)
  			if self.is_installed(module):
  				self.log('Starting module',level=logging.DEBUG)
  				if not module.start(self):
  					self.fail(module.module_id + ' failed on start', shutit_pexpect_child=self.get_shutit_pexpect_session_from_id('target_child').pexpect_child)