build: enable JS semicolons (#22783)
This commit is contained in:
parent
24e21467b9
commit
5d657dece4
354 changed files with 21512 additions and 21510 deletions
|
@ -4,38 +4,38 @@ Usage:
|
|||
$ node ./script/gn-check.js [--outDir=dirName]
|
||||
*/
|
||||
|
||||
const cp = require('child_process')
|
||||
const path = require('path')
|
||||
const args = require('minimist')(process.argv.slice(2), { string: ['outDir'] })
|
||||
const cp = require('child_process');
|
||||
const path = require('path');
|
||||
const args = require('minimist')(process.argv.slice(2), { string: ['outDir'] });
|
||||
|
||||
const { getOutDir } = require('./lib/utils')
|
||||
const { getOutDir } = require('./lib/utils');
|
||||
|
||||
const SOURCE_ROOT = path.normalize(path.dirname(__dirname))
|
||||
const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools')
|
||||
const SOURCE_ROOT = path.normalize(path.dirname(__dirname));
|
||||
const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools');
|
||||
|
||||
const OUT_DIR = getOutDir({ outDir: args.outDir })
|
||||
const OUT_DIR = getOutDir({ outDir: args.outDir });
|
||||
if (!OUT_DIR) {
|
||||
throw new Error('No viable out dir: one of Debug, Testing, or Release must exist.')
|
||||
throw new Error('No viable out dir: one of Debug, Testing, or Release must exist.');
|
||||
}
|
||||
|
||||
const env = Object.assign({
|
||||
CHROMIUM_BUILDTOOLS_PATH: path.resolve(SOURCE_ROOT, '..', 'buildtools'),
|
||||
DEPOT_TOOLS_WIN_TOOLCHAIN: '0'
|
||||
}, process.env)
|
||||
}, process.env);
|
||||
// Users may not have depot_tools in PATH.
|
||||
env.PATH = `${env.PATH}${path.delimiter}${DEPOT_TOOLS}`
|
||||
env.PATH = `${env.PATH}${path.delimiter}${DEPOT_TOOLS}`;
|
||||
|
||||
const gnCheckDirs = [
|
||||
'//electron:electron_lib',
|
||||
'//electron:electron_app',
|
||||
'//electron:manifests',
|
||||
'//electron/shell/common/api:mojo'
|
||||
]
|
||||
];
|
||||
|
||||
for (const dir of gnCheckDirs) {
|
||||
const args = ['check', `../out/${OUT_DIR}`, dir]
|
||||
const result = cp.spawnSync('gn', args, { env, stdio: 'inherit' })
|
||||
if (result.status !== 0) process.exit(result.status)
|
||||
const args = ['check', `../out/${OUT_DIR}`, dir];
|
||||
const result = cp.spawnSync('gn', args, { env, stdio: 'inherit' });
|
||||
if (result.status !== 0) process.exit(result.status);
|
||||
}
|
||||
|
||||
process.exit(0)
|
||||
process.exit(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue