Following a successful build, create a tarball and build result.
344972
def make_tarball(self, app_folder, build_data):
        
        # slugignore
        clean_slug_dir(app_folder)

        # tar up the result
        with tarfile.open('build.tar.gz', 'w:gz') as tar:
            tar.add(app_folder, arcname='')
        build_data.build_md5 = file_md5('build.tar.gz')

        tardest = os.path.join(self.outfolder, 'build.tar.gz')
        shutil.move('build.tar.gz', tardest)

        build_data_path = os.path.join(self.outfolder, 'build_result.yaml')
        print("Writing", build_data_path)
        with open(build_data_path, 'w') as f:
            f.write(build_data.as_yaml())
329632
def _post_build(self, module, encoding):
        """"""
        module.file_encoding = encoding
        self._manager.cache_module(module)
        # post tree building steps after we stored the module in the cache:
        for from_node in module._import_from_nodes:
            if from_node.modname == "__future__":
                for symbol, _ in from_node.names:
                    module.future_imports.add(symbol)
            self.add_from_names_to_locals(from_node)
        # handle delayed assattr nodes
        for delayed in module._delayed_assattr:
            self.delayed_assattr(delayed)

        # Visit the transforms
        if self._apply_transforms:
            module = self._manager.visit_transforms(module)
        return module
327456
def build(self, output_path=""):
        """"""

        self.output_path = self.checkOutputPath(output_path)
        self._buildStaticFiles()
        self.final_url = self._buildTemplates()
        printDebug("Done.", "comment")
        printDebug("=> %s" % (self.final_url), "comment")
        return self.final_url
1364264
function build() {
	runTypeScriptBuild('.build.es5', ts.ScriptTarget.ES5, true);
	runTypeScriptBuild('.build.es6', ts.ScriptTarget.ES2015, false);
	return Promise.all([
		generateBundledModule(
			path.resolve('.build.es5', 'index.js'),
			path.resolve('lib', 'firestorter.js'),
			'cjs'
		),

		generateBundledModule(
			path.resolve('.build.es5', 'index.js'),
			path.resolve('lib', 'firestorter.umd.js'),
			'umd',
			'firestorter'
		),

		generateBundledModule(
			path.resolve('.build.es5', 'index.js'),
			path.resolve('lib', 'firestorter.module.js'),
			'es'
		),

		generateBundledModule(
			path.resolve('.build.es6', 'index.js'),
			path.resolve('lib', 'firestorter.es6.js'),
			'es'
		)
	]).then(() => {
		generateMinified();
		// copyFlowDefinitions();
	});
}
683348
def ensure_build(self):
        
        if self.config.build_url:
            path = get_buildfile_path(self.config)

            # Ensure that builds_root has been created.
            mkdir(BUILDS_ROOT)
            build_md5 = getattr(self.config, 'build_md5', None)
            ensure_file(self.config.build_url, path, build_md5)

            # Now untar.
            self.untar()
1727
function prepareBuild(config) {

  function serve(exitCode) {

    // Save our exitCode for testing
    _exitCode = exitCode;

    // Reset skyuxconfig.json
    resetConfig();

    return server.start('unused-root', tmp)
      .then(port => browser.get(`https://localhost:${port}/dist/`));
  }

  writeConfig(config);

  return new Promise((resolve, reject) => {
    rimrafPromise(path.join(tmp, 'dist'))
      .then(() => exec(`node`, [cliPath, `build`, `--logFormat`, `none`], cwdOpts))
      .then(serve)
      .then(resolve)
      .catch(err => reject(err));
  });
}
1055293
def build(outdir):
    """"""

    print("Building your Blended files into a website!")

    reload(sys)
    sys.setdefaultencoding('utf8')

    build_files(outdir)

    print("The files are built! You can find them in the " + outdir +
          "/ directory. Run the view command to see what you have created in a web browser.")
247678
def build(self, ignore=None):
        ''''''
        self._prepare_workspace()
        self.install_dependencies()
        self.package(ignore)
1078563
def build(self):
        """"""
        for cmd in self.build_cmds:
            log.info('building command: {}'.format(cmd))
            full_cmd = 'cd {}; {}'.format(self.analyses_path, cmd)
            log.debug('full command: {}'.format(full_cmd))
            subprocess.call(full_cmd, shell=True)
            log.info('build done')
237130
def build(self, mode=None, check=False):
        
        kwargs = {}
        if not self.build_only:  # don't try to deploy twice
            kwargs[' --build-only'] = True
        if not self.local:
            kwargs['--local'] = True
        if check:
            kwargs['--check-built'] = True
        remote_args = self.formatted_args(self.args, mode, **kwargs)
        cmds = tuple() if self.check_built or self._updated else self.cmds_pyontutils()
        if not self._updated:
            self._updated = True
        return self.runOnBuild(*cmds,
                               f'scigraph-deploy {remote_args}',
                               defer_shell_expansion=True,
                               oper=AND)
442364
def cmd_build(conf: Config, run_tests: bool=False):
    """"""
    build_context = BuildContext(conf)
    populate_targets_graph(build_context, conf)
    build_context.build_graph(run_tests=run_tests)
    build_context.write_artifacts_metadata()
896445
function build(mode, system, cdef, out, cb) {
    logger.info('building');
    out.stdout('--> building');

    builder.build(mode, system, cdef, out, function(err, specific) {
      if (err) { logger.error(err); return cb(err); }
      cb(err);
    });
  }
210831
def create_build_context(image, inputs, wdir):
    
    assert os.path.isabs(wdir)

    dockerlines = ["FROM %s" % image,
                    "RUN mkdir -p %s" % wdir]
    build_context = {}

    # This loop creates a Build Context for building the provisioned image
    # We create a tar archive to be added to the root of the image filesystem
    if inputs:
        dockerlines.append('COPY root /')
        for ifile, (path, obj) in enumerate(inputs.items()):
            if not os.path.isabs(path):
                path = os.path.join(wdir, path)
            assert path[0] == '/'
            build_context['root' + path] = obj

    dockerstring = '\n'.join(dockerlines)
    build_context['Dockerfile'] = pyccc.BytesContainer(dockerstring.encode('utf-8'))
    return build_context
1086340
def build(self, tool):
        """"""

        tools = self._validate_tools(tool)
        if tools == -1:
            return -1

        result = 0

        for build_tool in tools:
            builder = ToolsSupported().get_tool(build_tool)
            # None is an error
            if builder is None:
                logger.debug("Tool: %s was not found" % builder)
                result = -1
                continue

            logger.debug("Building for tool: %s", build_tool)
            logger.debug(self.generated_files)
            if builder(self.generated_files[build_tool], self.settings).build_project() == -1:
                # if one fails, set to -1 to report
                result = -1
        return result
757437
def _handle_app_result_build_failure(self,out,err,exit_status,result_paths):
        

        try:
            raise ApplicationError, \
             'RAxML failed to produce an output file due to the following error: \n\n%s ' \
             % err.read()
        except:
            raise ApplicationError,\
                'RAxML failed to run properly.'
5006
def assert_build_result(success, warnings)
      success ? assert_no_error_occurred : assert_error_occurred
      warnings.each do |code|
        expect_warning(code, :warning_only => true)
      end
    end
78803
def _build_tarball(src_repo) -> str:
    
    run = partial(subprocess.run, cwd=src_repo, check=True)
    run(['git', 'clean', '-xdff'])
    src_repo = Path(src_repo)
    if os.path.exists(src_repo / 'es' / 'upstream'):
        run(['git', 'submodule', 'update', '--init', '--', 'es/upstream'])
    run(['./gradlew', '--no-daemon', 'clean', 'distTar'])
    distributions = Path(src_repo) / 'app' / 'build' / 'distributions'
    return next(distributions.glob('crate-*.tar.gz'))