def _run_script(self, runtime, build): script = uniqpath(runtime.curdir, 'script') script.write_bytes(build['script']) runtime.shell(['bash', '-x', script], environ=self.environ, merge_output=True) script.unlink()
def prepare_source(self, runtime, component, repodir): try: metadata = component['repository'] except KeyError: raise TaskError('invalid repository metadata') sourcepath = uniqpath(runtime.curdir, 'src') self.repository = Repository.instantiate(metadata['type'], str(sourcepath), runtime=runtime, cachedir=repodir) self.repository.checkout(metadata) return sourcepath