mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
allow either host_debug or host_debug_unopt for pre-push verification (flutter/engine#33000)
This commit is contained in:
parent
86baf448e2
commit
8ca73cd2d0
@ -37,7 +37,7 @@ class PrePushCommand extends Command<bool> {
|
||||
final Stopwatch sw = Stopwatch()..start();
|
||||
// First ensure that out/host_debug/compile_commands.json exists by running
|
||||
// //flutter/tools/gn.
|
||||
final io.File compileCommands = io.File(path.join(
|
||||
io.File compileCommands = io.File(path.join(
|
||||
flutterRoot,
|
||||
'..',
|
||||
'out',
|
||||
@ -45,14 +45,15 @@ class PrePushCommand extends Command<bool> {
|
||||
'compile_commands.json',
|
||||
));
|
||||
if (!compileCommands.existsSync()) {
|
||||
final bool gnResult = await _runCheck(
|
||||
compileCommands = io.File(path.join(
|
||||
flutterRoot,
|
||||
path.join(flutterRoot, 'tools', 'gn'),
|
||||
<String>[],
|
||||
'GN for host_debug',
|
||||
verbose: verbose,
|
||||
);
|
||||
if (!gnResult) {
|
||||
'..',
|
||||
'out',
|
||||
'host_debug_unopt',
|
||||
'compile_commands.json',
|
||||
));
|
||||
if (!compileCommands.existsSync()) {
|
||||
io.stderr.writeln('clang-tidy requires a fully built host_debug or host_debug_unopt build directory');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user