@@ -474,25 +474,25 @@ func (b *batcher) doBuild(ctx context.Context) (*Package, error) {
474
474
entryPoints = append (entryPoints , pth )
475
475
}
476
476
477
- for k , v := range b .scriptGroups {
478
- keyPath := k
477
+ for _ , g := range b .scriptGroups . Sorted () {
478
+ keyPath := g . id
479
479
var runners []scriptRunnerTemplateContext
480
- for _ , vv := range v .runnersOptions .ByKey () {
480
+ for _ , vv := range g .runnersOptions .ByKey () {
481
481
runnerKeyPath := keyPath + "_" + vv .Key ().String ()
482
482
runnerImpPath := paths .AddLeadingSlash (runnerKeyPath + "_runner" + vv .Compiled ().Resource .MediaType ().FirstSuffix .FullSuffix )
483
483
runners = append (runners , scriptRunnerTemplateContext {opts : vv , Import : runnerImpPath })
484
- addResource (k , runnerImpPath , vv .Compiled ().Resource , false )
484
+ addResource (g . id , runnerImpPath , vv .Compiled ().Resource , false )
485
485
}
486
486
487
487
t := & batchGroupTemplateContext {
488
488
keyPath : keyPath ,
489
- ID : v .id ,
489
+ ID : g .id ,
490
490
Runners : runners ,
491
491
}
492
492
493
- instances := v .instancesOptions .ByKey ()
493
+ instances := g .instancesOptions .ByKey ()
494
494
495
- for _ , vv := range v .scriptsOptions .ByKey () {
495
+ for _ , vv := range g .scriptsOptions .ByKey () {
496
496
keyPath := keyPath + "_" + vv .Key ().String ()
497
497
opts := vv .Compiled ()
498
498
impPath := path .Join (PrefixHugoVirtual , opts .Dir (), keyPath + opts .Resource .MediaType ().FirstSuffix .FullSuffix )
@@ -502,7 +502,7 @@ func (b *batcher) doBuild(ctx context.Context) (*Package, error) {
502
502
name : keyPath ,
503
503
resourceGetter : impCtx ,
504
504
scriptOptions : opts ,
505
- dm : v .dependencyManager ,
505
+ dm : g .dependencyManager ,
506
506
})
507
507
508
508
bt := scriptBatchTemplateContext {
@@ -528,10 +528,10 @@ func (b *batcher) doBuild(ctx context.Context) (*Package, error) {
528
528
state .importerImportContext .Set (s , importContext {
529
529
name : s ,
530
530
resourceGetter : nil ,
531
- dm : v .dependencyManager ,
531
+ dm : g .dependencyManager ,
532
532
})
533
533
534
- addResource (v .id , s , r , true )
534
+ addResource (g .id , s , r , true )
535
535
}
536
536
537
537
mediaTypes := b .client .d .ResourceSpec .MediaTypes ()
0 commit comments