build-system/pr-check/build-targets.js
/**
 * Determines the targets that will be executed by the main method of
 * this script. The order within this function matters.
 * @return {!Set<string>}
 */
Determines the targets that will be executed by the main method of
this script. The order within this function matters.
@return {!Set}
Determines the targets that will be executed by the main method of this script . The order within this function matters . @return { !Set }
function determineBuildTargets() {
  const filePaths = gitDiffNameOnlyMaster();
  if (filePaths.length == 0) {
    return new Set([
      'BUILD_SYSTEM',
      'VALIDATOR_WEBUI',
      'VALIDATOR',
      'RUNTIME',
      'UNIT_TEST',
      'DEV_DASHBOARD',
      'INTEGRATION_TEST',
      'DOCS',
      'FLAG_CONFIG',
      'VISUAL_DIFF']);
  }
  const targetSet = new Set();
  for (const p of filePaths) {
    if (isBuildSystemFile(p)) {
      targetSet.add('BUILD_SYSTEM');
      if (isBuildSystemAndRuntimeFile(p)) {
        targetSet.add('RUNTIME');
      }
    } else if (isValidatorWebuiFile(p)) {
      targetSet.add('VALIDATOR_WEBUI');
    } else if (isValidatorFile(p)) {
      targetSet.add('VALIDATOR');
    } else if (isDocFile(p)) {
      targetSet.add('DOCS');
    } else if (isFlagConfig(p)) {
      targetSet.add('FLAG_CONFIG');
    } else if (isUnitTest(p)) {
      targetSet.add('UNIT_TEST');
    } else if (isDevDashboardFile(p)) {
      targetSet.add('DEV_DASHBOARD');
    } else if (isIntegrationTest(p)) {
      targetSet.add('INTEGRATION_TEST');
    } else if (isVisualDiffFile(p)) {
      targetSet.add('VISUAL_DIFF');
    } else {
      targetSet.add('RUNTIME');
    }
  }
  return targetSet;
}
function determineBuildTargets ( ) { const filePaths = gitDiffNameOnlyMaster ( ) ; if ( filePaths . length == 0 ) { return new Set ( [ 'BUILD_SYSTEM' , 'VALIDATOR_WEBUI' , 'VALIDATOR' , 'RUNTIME' , 'UNIT_TEST' , 'DEV_DASHBOARD' , 'INTEGRATION_TEST' , 'DOCS' , 'FLAG_CONFIG' , 'VISUAL_DIFF' ] ) ; } const targetSet = new Set ( ) ; for ( const p of filePaths ) { if ( isBuildSystemFile ( p ) ) { targetSet . add ( 'BUILD_SYSTEM' ) ; if ( isBuildSystemAndRuntimeFile ( p ) ) { targetSet . add ( 'RUNTIME' ) ; } } else if ( isValidatorWebuiFile ( p ) ) { targetSet . add ( 'VALIDATOR_WEBUI' ) ; } else if ( isValidatorFile ( p ) ) { targetSet . add ( 'VALIDATOR' ) ; } else if ( isDocFile ( p ) ) { targetSet . add ( 'DOCS' ) ; } else if ( isFlagConfig ( p ) ) { targetSet . add ( 'FLAG_CONFIG' ) ; } else if ( isUnitTest ( p ) ) { targetSet . add ( 'UNIT_TEST' ) ; } else if ( isDevDashboardFile ( p ) ) { targetSet . add ( 'DEV_DASHBOARD' ) ; } else if ( isIntegrationTest ( p ) ) { targetSet . add ( 'INTEGRATION_TEST' ) ; } else if ( isVisualDiffFile ( p ) ) { targetSet . add ( 'VISUAL_DIFF' ) ; } else { targetSet . add ( 'RUNTIME' ) ; } } return targetSet ; }
Determines the targets that will be executed by the main method of
 this script.
Determines the targets that will be executed by the main method of this script .