Skip to content

Commit 9ce8585

Browse files
authored
[infra] Fix CI (#2378)
1 parent f5cf52d commit 9ce8585

File tree

1 file changed

+57
-54
lines changed

1 file changed

+57
-54
lines changed

tool/ci.dart

Lines changed: 57 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,17 @@ void main(List<String> arguments) async {
9999
'pkgs/hooks/example/build/native_add_app/',
100100
),
101101
'dart',
102-
['--enable-experiment=native-assets', 'build', 'cli', 'bin/native_add_app.dart'],
102+
[
103+
'--enable-experiment=native-assets',
104+
'build',
105+
'cli',
106+
'bin/native_add_app.dart',
107+
],
103108
);
104109
_runProcess(
105110
repositoryRoot
106111
.resolve(
107-
'pkgs/hooks/example/build/native_add_app/build/cli/${Abi.current().toString().replaceAll('_', '-')}/bundle/bin/native_add_app${Platform.isWindows ? '.exe' : ''}',
112+
'pkgs/hooks/example/build/native_add_app/build/cli/${Abi.current().toString()}/bundle/bin/native_add_app${Platform.isWindows ? '.exe' : ''}',
108113
)
109114
.toFilePath(),
110115
[],
@@ -134,51 +139,50 @@ void main(List<String> arguments) async {
134139
}
135140

136141
ArgParser makeArgParser() {
137-
final parser =
138-
ArgParser()
139-
..addFlag(
140-
'help',
141-
abbr: 'h',
142-
negatable: false,
143-
help: 'Prints this help message.',
144-
)
145-
..addFlag(
146-
'analyze',
147-
defaultsTo: true,
148-
help: 'Run `dart analyze` on the packages.',
149-
)
150-
..addFlag(
151-
'coverage',
152-
defaultsTo: false,
153-
help: 'Run `dart run coverage:test_with_coverage` on the packages.',
154-
)
155-
..addFlag(
156-
'example',
157-
defaultsTo: true,
158-
help: 'Run tests and executables for examples.',
159-
)
160-
..addFlag(
161-
'format',
162-
defaultsTo: true,
163-
help: 'Run `dart format` on the packages.',
164-
)
165-
..addFlag(
166-
'generate',
167-
defaultsTo: true,
168-
help: 'Run code generation scripts.',
169-
)
170-
..addFlag(
171-
'pub',
172-
defaultsTo: false,
173-
help:
174-
'Run `dart pub get` on the root and non-workspace packages.\n'
175-
'Run `dart pub global activate coverage`.',
176-
)
177-
..addFlag(
178-
'test',
179-
defaultsTo: true,
180-
help: 'Run `dart test` on the packages.',
181-
);
142+
final parser = ArgParser()
143+
..addFlag(
144+
'help',
145+
abbr: 'h',
146+
negatable: false,
147+
help: 'Prints this help message.',
148+
)
149+
..addFlag(
150+
'analyze',
151+
defaultsTo: true,
152+
help: 'Run `dart analyze` on the packages.',
153+
)
154+
..addFlag(
155+
'coverage',
156+
defaultsTo: false,
157+
help: 'Run `dart run coverage:test_with_coverage` on the packages.',
158+
)
159+
..addFlag(
160+
'example',
161+
defaultsTo: true,
162+
help: 'Run tests and executables for examples.',
163+
)
164+
..addFlag(
165+
'format',
166+
defaultsTo: true,
167+
help: 'Run `dart format` on the packages.',
168+
)
169+
..addFlag(
170+
'generate',
171+
defaultsTo: true,
172+
help: 'Run code generation scripts.',
173+
)
174+
..addFlag(
175+
'pub',
176+
defaultsTo: false,
177+
help:
178+
'Run `dart pub get` on the root and non-workspace packages.\n'
179+
'Run `dart pub global activate coverage`.',
180+
)
181+
..addFlag(
182+
'test',
183+
defaultsTo: true,
184+
help: 'Run `dart test` on the packages.',
185+
);
182186
return parser;
183187
}
184188

@@ -190,13 +194,12 @@ List<String> loadPackagesFromPubspec() {
190194
File.fromUri(repositoryRoot.resolve('pubspec.yaml')).readAsStringSync(),
191195
);
192196
final workspace = (pubspecYaml['workspace'] as List).cast<String>();
193-
final packages =
194-
workspace
195-
.where(
196-
(package) =>
197-
!package.contains('test_data') && !package.contains('example'),
198-
)
199-
.toList();
197+
final packages = workspace
198+
.where(
199+
(package) =>
200+
!package.contains('test_data') && !package.contains('example'),
201+
)
202+
.toList();
200203
return packages;
201204
}
202205

0 commit comments

Comments
 (0)