@@ -27,8 +27,9 @@ Map<String, String> generateGitHubYml(
2727
2828 final allJobStages = {for (var job in jobs) job.stageName};
2929 final orderedStages = calculateOrderedStages (
30- rootConfig, rootConfig.monoConfig.githubConditionalStages)
31- ..add (_onCompletionStage);
30+ rootConfig,
31+ rootConfig.monoConfig.githubConditionalStages,
32+ )..add (_onCompletionStage);
3233
3334 final output = < String , String > {};
3435
@@ -201,24 +202,26 @@ Iterable<_MapEntryWithStage> _listJobs(
201202 if (mergeStages.contains (first.job.stageName)) {
202203 final packages = entry.value.map ((t) => t.job.package).toList ()..sort ();
203204 yield jobEntry (
204- first.jobYaml (
205+ first.jobYaml (
206+ rootConfig,
207+ packages: packages,
208+ oneOs: differentOperatingSystems.length == 1 ,
209+ oneSdk: differentSdks.length == 1 ,
210+ onePackage: differentPackages.length == 1 ,
211+ ),
212+ first.job.stageName,
213+ );
214+ } else {
215+ yield * entry.value.map (
216+ (e) => jobEntry (
217+ e.jobYaml (
205218 rootConfig,
206- packages: packages,
207219 oneOs: differentOperatingSystems.length == 1 ,
208220 oneSdk: differentSdks.length == 1 ,
209221 onePackage: differentPackages.length == 1 ,
210222 ),
211- first.job.stageName);
212- } else {
213- yield * entry.value.map (
214- (e) => jobEntry (
215- e.jobYaml (
216- rootConfig,
217- oneOs: differentOperatingSystems.length == 1 ,
218- oneSdk: differentSdks.length == 1 ,
219- onePackage: differentPackages.length == 1 ,
220- ),
221- e.job.stageName),
223+ e.job.stageName,
224+ ),
222225 );
223226 }
224227 }
@@ -227,9 +230,12 @@ Iterable<_MapEntryWithStage> _listJobs(
227230 // appropriate `needs` config to each.
228231 if (onCompletionJobs != null && onCompletionJobs.isNotEmpty) {
229232 for (var jobConfig in onCompletionJobs) {
230- yield jobEntry ({
231- ...jobConfig,
232- }, _onCompletionStage);
233+ yield jobEntry (
234+ {
235+ ...jobConfig,
236+ },
237+ _onCompletionStage,
238+ );
233239 }
234240 }
235241}
@@ -265,24 +271,28 @@ extension on CIJobEntry {
265271 for (var package in packages) {
266272 final pubStepId = '${package .replaceAll ('/' , '_' )}_'
267273 'pub_${rootConfig .monoConfig .pubAction }' ;
268- commandEntries.add (_CommandEntry (
269- '$package ; $pubCommand ' ,
270- pubCommand,
271- id: pubStepId,
272- // Run this regardless of the success of other steps other than the
273- // pub step.
274- ifCondition: "always() && steps.checkout.conclusion == 'success'" ,
275- workingDirectory: package,
276- ));
277- for (var i = 0 ; i < commands.length; i++ ) {
278- commandEntries.add (_CommandEntry (
279- '$package ; ${job .tasks [i ].command }' ,
280- _commandForOs (job.tasks[i].command),
274+ commandEntries.add (
275+ _CommandEntry (
276+ '$package ; $pubCommand ' ,
277+ pubCommand,
278+ id: pubStepId,
281279 // Run this regardless of the success of other steps other than the
282280 // pub step.
283- ifCondition: "always() && steps.$ pubStepId .conclusion == 'success'" ,
281+ ifCondition: "always() && steps.checkout .conclusion == 'success'" ,
284282 workingDirectory: package,
285- ));
283+ ),
284+ );
285+ for (var i = 0 ; i < commands.length; i++ ) {
286+ commandEntries.add (
287+ _CommandEntry (
288+ '$package ; ${job .tasks [i ].command }' ,
289+ _commandForOs (job.tasks[i].command),
290+ // Run this regardless of the success of other steps other than the
291+ // pub step.
292+ ifCondition: "always() && steps.$pubStepId .conclusion == 'success'" ,
293+ workingDirectory: package,
294+ ),
295+ );
286296 }
287297 }
288298
0 commit comments