Example #1
0
    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()
Example #2
0
    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
Example #3
0
    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
Example #4
0
    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()