@@ -19,7 +19,7 @@ public class CodeQLInstallation
19
19
public string CLIBundle { get ; set ; }
20
20
public string StandardLibraryIdent { get ; set ; }
21
21
public bool EnableCustomCodeQLBundles { get ; set ; }
22
- public string [ ] ExportedCustomizationPacks { get ; set ; }
22
+ public QLTCustomizationPack [ ] CustomizationPacks { get ; set ; }
23
23
public bool QuickBundle { get ; set ; }
24
24
public string Base { get ; set ; }
25
25
@@ -44,7 +44,7 @@ public static CodeQLInstallation LoadFromConfig(QLTConfig c)
44
44
CLIBundle = config . CodeQLCLIBundle ,
45
45
StandardLibraryIdent = config . CodeQLStandardLibraryIdent ,
46
46
StandardLibraryVersion = config . CodeQLStandardLibrary ,
47
- ExportedCustomizationPacks = config . ExportedCustomizationPacks ,
47
+ CustomizationPacks = config . CustomizationPacks ,
48
48
Base = config . Base
49
49
} ;
50
50
@@ -53,9 +53,9 @@ public static CodeQLInstallation LoadFromConfig(QLTConfig c)
53
53
54
54
public void LogPacksToBeBuilt ( )
55
55
{
56
- if ( ExportedCustomizationPacks != null )
56
+ if ( CustomizationPacks != null )
57
57
{
58
- foreach ( var p in ExportedCustomizationPacks )
58
+ foreach ( var p in CustomizationPacks )
59
59
{
60
60
Log < CodeQLInstallation > . G ( ) . LogInformation ( $ "Pack: { p } ") ;
61
61
}
@@ -274,14 +274,16 @@ private void CustomBundleInstall()
274
274
275
275
var workingDirectory = Path . GetFullPath ( Base ) ;
276
276
277
- if ( ExportedCustomizationPacks == null || ExportedCustomizationPacks . Length == 0 )
277
+ if ( CustomizationPacks == null || CustomizationPacks . Length == 0 )
278
278
{
279
279
throw new Exception ( "No packs are set to be exported. Please add at least one pack to export in your `qlt.conf.json` file under the property `ExportedCustomizationPacks`." ) ;
280
280
}
281
281
282
282
Log < CodeQLInstallation > . G ( ) . LogInformation ( $ "Building custom bundle. This may take a while...") ;
283
283
284
- var packs = string . Join ( " " , ExportedCustomizationPacks ) ;
284
+ var packsToExport = CustomizationPacks . Where ( p => p . Export == true ) . Select ( p => p . Name ) . ToArray ( ) ;
285
+
286
+ var packs = string . Join ( " " , packsToExport ) ;
285
287
// next, we run the bundling tool.
286
288
// typical command line:
287
289
// codeql_bundle -b .\scratch\codeql-bundle-win64.tar.gz -o scratch\out -w .\tests\workspace\ --help
0 commit comments