region Public API 
Generate build options depending on the options, provided in console.

@param {String} buildName - build identifier
@return {Object} build options; null - if none are found
967618
function getBuildConfigurationByName(ctx, buildName) {
  // load options from the chcpbuild.options file
  var chcpBuildOptions = getBuildOptionsFromConfig(ctx);
  if (chcpBuildOptions == null) {
    return null;
  }

  var resultConfig = chcpBuildOptions[buildName];
  if (!resultConfig) {
    return null;
  }

  // backwards capability
  // TODO: remove this in the next versions
  if (resultConfig['config-file'] && !resultConfig['config-file']['url']) {
    var url = resultConfig['config-file'];
    resultConfig['config-file'] = {
      'url': url
    };
  }

  return resultConfig;
}
208005
@SuppressWarnings("static-access")
  private static Options buildGeneralOptions(Options opts) {
    Option fs = OptionBuilder.withArgName("local|namenode:port")
    .hasArg()
    .withDescription("specify a namenode")
    .create("fs");
    Option jt = OptionBuilder.withArgName("local|jobtracker:port")
    .hasArg()
    .withDescription("specify a job tracker")
    .create("jt");
    Option oconf = OptionBuilder.withArgName("configuration file")
    .hasArg()
    .withDescription("specify an application configuration file")
    .create("conf");
    Option property = OptionBuilder.withArgName("property=value")
    .hasArg()
    .withDescription("use value for given property")
    .create('D');
    Option libjars = OptionBuilder.withArgName("paths")
    .hasArg()
    .withDescription("comma separated jar files to include in the classpath.")
    .create("libjars");
    Option files = OptionBuilder.withArgName("paths")
    .hasArg()
    .withDescription("comma separated files to be copied to the " +
           "map reduce cluster")
    .create("files");
    Option archives = OptionBuilder.withArgName("paths")
    .hasArg()
    .withDescription("comma separated archives to be unarchived" +
                     " on the compute machines.")
    .create("archives");

    opts.addOption(fs);
    opts.addOption(jt);
    opts.addOption(oconf);
    opts.addOption(property);
    opts.addOption(libjars);
    opts.addOption(files);
    opts.addOption(archives);

    return opts;
  }
96059
function execOptionBuilder(options) {
  var validKeys = {
    cwd:        true,
    env:        true,
    encoding:   true,
    shell:      true,
    timeout:    true,
    maxBuffer:  true,
    killSignal: true,
    uid:        true,
    gid:        true
  };

  options = options || {};

  return Object.keys(options).reduce(function(result, key) {
    if(validKeys[key]) {
      result[key] = options[key];
    }
    return result;
  }, {});
}
510641
function build(node, nodes, scope) {
  var first = node.specifiers[0];
  if (!t.isExportNamespaceSpecifier(first) && !t.isExportDefaultSpecifier(first)) return;

  var specifier = node.specifiers.shift();
  var uid = scope.generateUidIdentifier(specifier.exported.name);

  var newSpecifier;
  if (t.isExportNamespaceSpecifier(specifier)) {
    newSpecifier = t.importNamespaceSpecifier(uid);
  } else {
    newSpecifier = t.importDefaultSpecifier(uid);
  }

  nodes.push(t.importDeclaration([newSpecifier], node.source));
  nodes.push(t.exportNamedDeclaration(null, [t.exportSpecifier(uid, specifier.exported)]));

  build(node, nodes, scope);
}
242606
public static Options buildOptions() {
    Options options = new Options();

    // Build in/output file arguments, which are required, but there is no 
    // addOption method that can specify this
    OptionBuilder.isRequired();
    OptionBuilder.hasArgs();
    OptionBuilder.withLongOpt("outputFilename");
    options.addOption(OptionBuilder.create("o"));
    
    OptionBuilder.isRequired();
    OptionBuilder.hasArgs();
    OptionBuilder.withLongOpt("inputFilename");
    options.addOption(OptionBuilder.create("i"));
    
    options.addOption("p", "processor", true, "");
    options.addOption("v", "verbose", false, "");
    options.addOption("h", "help", false, "");

    return options;
  }
406126
function getMyVersion(buildDir) {
  var builds = getBuildFiles(buildDir);
  var chosen = builds[0];

  for (var n=0; n<builds.length; n++) {
    if (semvar.satisfies(getVersion(builds[n]), '<=' + process.versions.node)) chosen = builds[n];
  }

  return require(buildDir + '/' + chosen);
}
1296796
function buildBuildList() {
  const buildList = {
    'build/tests.js': allPackages.map(pkg => `packages/${pkg}/test/*.js`)
  };
  allPackages.forEach(pkg => {
    buildList[`packages/${pkg}/dist/${pkg}.js`] = [`packages/${pkg}/globals.js`];
  });
  buildList['packages/demos/dist/demos.js'] = ['packages/demos/src/*.js'];
  return buildList;
}
259095
function createForBuild(build) {
  var exports = {};
  
  function bundles(name, sourceType) {
    /*jshint validthis: true */
    var ml = build.bundles(name, sourceType);
    return this.markSafe(ml);
  }
  exports.bundles = bundles;
  
  function link(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.link(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.link = link;
  
  function script(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.script(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.script = script;
  
  function scriptCode(js) {
    /*jshint validthis: true */
    var ml = '<script type="text/javascript">' + js + '</script>';
    return this.markSafe(ml);
  }
  exports.scriptCode = scriptCode;

  exports.t = build.translate.bind(build);
  exports.tn = build.translateNumeric.bind(build);

  return exports;
}
404986
def get_build_configuration(id=None, name=None):
    
    data = get_build_configuration_raw(id, name)
    if data:
        return utils.format_json(data)
262159
function getBuildingConfigs (target) {
  return target.map(({ dirname, name, version, entry, outDir, styleFilename }) => {
    return formats.map(format => {
      return {
        inputOptions: getInputOptions({ entry, outDir, styleFilename }),
        outputOptions: getOutputOptions({ outDir, name, version, format })
      }
    })
  }).reduce((prev, next) => prev.concat(next))
}
933468
function spawnBuild(argv, skyPagesConfig, webpack) {

  if (argv.build === false) {
    logger.info('Skipping build step');

    const file = 'dist/metadata.json';
    if (!fs.existsSync(file)) {
      logger.info(`Unable to skip build step.  "${file}" not found.`);
    } else {
      return Promise.resolve({
        metadata: fs.readJsonSync(file)
      });
    }
  }

  return build(argv, skyPagesConfig, webpack)
    .then(stats => stats.toJson().chunks);
}
472207
function buildFunction(options) {
  if (!options.name) {
    throw new Error('Function name is required');
  }

  let parameters = parametersArtifact.buildParameters(options);
  let defaultAlarms = alarmArtifact.buildServiceAlarms(options);
  let lambda = lambdaArtifact.buildLambda(options);
  let role = roleArtifact.buildRole(options);
  let cloudwatchEvent = {};
  let schedule = {};
  let sns = {};
  let webhook = {};
  let snsDestination = {};

  // if no event source specified default to an SNS rule
  let hasEventSources = options.eventSources && options.eventSources !== {};
  if (!hasEventSources) {
    sns = snsArtifact.buildSnsEvent(options);
  }

  // only one of each event source type can be specified by a function
  if (options.eventSources) {
    for (let event in options.eventSources) {
      switch(event) {
        case 'cloudwatchEvent':
          cloudwatchEvent = cloudWatchArtifact.buildCloudwatchEvent(options, 'cloudwatchEvent');
          break;
        case 'schedule':
          schedule = cloudWatchArtifact.buildCloudwatchEvent(options, 'schedule');
          break;
        case 'sns':
          sns = snsArtifact.buildSnsEvent(options);
          break;
        case 'webhook':
          webhook = webhookArtifact.buildWebhookEvent(options);
          break;
        default:
          throw new Error(`Unknown event source specified: ${event}`);
      }
    }
  }

  // defaults to SNS Destination if none specified
  if (options.destinations) {
    for (let destination in options.destinations) {
      switch(destination) {
        case 'sns':
          snsDestination = destinationArtifact.buildSnsDestination(options);
          break;
        default:
          throw new Error(`Unknown destination specified: ${destination}`);
      }
    }
  }

  let functionTemplate = compileFunction(
    parameters,
    role,
    defaultAlarms,
    lambda,
    cloudwatchEvent,
    schedule,
    sns,
    webhook,
    snsDestination
  );

  dispatchArtifact.addDispatchSupport(functionTemplate, options);

  // Sanity check after template compilation since
  // functions may add their own Parameter dependencies
  if (Object.keys(functionTemplate.Parameters).length > 60) {
    throw new Error('More than 60 parameters specified');
  }

  // since build functions may create their own parameters outside of
  // the buildParameters step, this is called after all functions
  // have been run, gathers all parameters and injects them into the lambda
  // environment configuration
  // TODO: is this possible when embedding?

  if (!functionTemplate.Variables) {
    functionTemplate.Variables = {};
  }
  // make some global env vars available
  functionTemplate.Variables.StackName = cf.stackName;
  functionTemplate.Variables.Region = cf.region;
  functionTemplate.Variables.AccountId = cf.accountId;
  functionTemplate.Variables.StackId = cf.stackId;

  for (let param in functionTemplate.Parameters) {
    functionTemplate.Variables[param] = cf.ref(param);
  }

  if (!functionTemplate.Resources) {
    functionTemplate.Resources[options.name] = {};
  }

  functionTemplate.Resources[options.name].Properties.Environment.Variables = functionTemplate.Variables;

  // Variables object is not valid CFN
  delete functionTemplate.Variables;

  // compile any additional built-in policy objects into role
  if (functionTemplate.Policies) {
    let lambdaCFNRoles = ['LambdaCfnRole', 'LambdaCfnDispatchRole'];
    for (let lambdaRole in lambdaCFNRoles) {
      functionTemplate.Resources[lambdaRole].Properties.Policies.push(functionTemplate.Policies);
    }
    delete functionTemplate.Policies;
  }

  return functionTemplate;
}
450766
function all_builds(jobName, param, customParams, callback) {

      // TODO better name and handle the "param" ???
      var _doArgs17 = doArgs(arguments, ['string', ['string', 'id,timestamp,result,duration'], ['object', {}], 'function']);

      var _doArgs18 = _slicedToArray(_doArgs17, 4);

      jobName = _doArgs18[0];
      param = _doArgs18[1];
      customParams = _doArgs18[2];
      callback = _doArgs18[3];
      doRequest({
        urlPattern: [ALL_BUILDS, jobName, param],
        bodyProp: 'allBuilds'
      }, customParams, callback);
    }
25204
function (buildConfig) {
        var src;
        if (buildConfig.nodeProject) {
            src = '<%=buildConfig.libDirectory%>/**/*.js';
        } else if (buildConfig.bowerJSON) {
            src = buildConfig.bowerJSON.main;
        }

        return src;
    }
488888
String buildSelect(String htmlAttributes, SelectOptions options) {

        return buildSelect(htmlAttributes, options.getOptions(), options.getValues(), options.getSelectedIndex());
    }
927510
function doBuild () {
    // Enable Verbose build
    var verbose = log.levels[log.level] <= log.levels.verbose
    if (!win && verbose) {
      argv.push('V=1')
    }
    if (win && !verbose) {
      argv.push('/clp:Verbosity=minimal')
    }

    if (win) {
      // Turn off the Microsoft logo on Windows
      argv.push('/nologo')
    }

    // Specify the build type, Release by default
    if (win) {
      // Convert .gypi config target_arch to MSBuild /Platform
      // Since there are many ways to state '32-bit Intel', default to it.
      // N.B. msbuild's Condition string equality tests are case-insensitive.
      var archLower = arch.toLowerCase()
      var p = archLower === 'x64' ? 'x64' :
              (archLower === 'arm' ? 'ARM' :
              (archLower === 'arm64' ? 'ARM64' : 'Win32'))
      argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
      if (jobs) {
        var j = parseInt(jobs, 10)
        if (!isNaN(j) && j > 0) {
          argv.push('/m:' + j)
        } else if (jobs.toUpperCase() === 'MAX') {
          argv.push('/m:' + require('os').cpus().length)
        }
      }
    } else {
      argv.push('BUILDTYPE=' + buildType)
      // Invoke the Makefile in the 'build' dir.
      argv.push('-C')
      argv.push('build')
      if (jobs) {
        var j = parseInt(jobs, 10)
        if (!isNaN(j) && j > 0) {
          argv.push('--jobs')
          argv.push(j)
        } else if (jobs.toUpperCase() === 'MAX') {
          argv.push('--jobs')
          argv.push(require('os').cpus().length)
        }
      }
    }

    if (win) {
      // did the user specify their own .sln file?
      var hasSln = argv.some(function (arg) {
        return path.extname(arg) == '.sln'
      })
      if (!hasSln) {
        argv.unshift(gyp.opts.solution || guessedSolution)
      }
    }

    var proc = gyp.spawn(command, argv)
    proc.on('exit', onExit)
  }
899111
function optionBuilder(options) {
  options = options || {};

  var results = {stdin: [], args: [], files: []};
  Object.keys(options).map(function (option) {
    var p4option = p4options[option];
    if (!p4option) return;
    if (p4option.category !== 'unary') {
      if ((options[option] || {}).constructor !== p4option.type) return;
    }
    if (p4option.category === 'stdin') {
      results.stdin.push(p4option.cmd + options[option]);
      if (results.args.indexOf('-i') < 0) results.args.push('-i');
    } else if (p4option.cmd) {
      results.args.push(p4option.cmd);
      if (p4option.category === 'mixed') results.args.push(options[option]);
    } else {
      results.files = results.files.concat(options[option]);
    }
  });
  return results;
}