@@ -228,6 +228,7 @@ def codeql_pack(
228
228
zip_filename = None ,
229
229
visibility = None ,
230
230
install_dest = "extractor-pack" ,
231
+ compression_level = None ,
231
232
** kwargs ):
232
233
"""
233
234
Define a codeql pack. This macro accepts `pkg_files`, `pkg_filegroup` or their `codeql_*` counterparts as `srcs`.
@@ -243,6 +244,9 @@ def codeql_pack(
243
244
The distinction between arch-specific and generic contents is made based on whether the paths (including possible
244
245
prefixes added by rules) contain the special `{CODEQL_PLATFORM}` placeholder, which in case it is present will also
245
246
be replaced by the appropriate platform (`linux64`, `win64` or `osx64`).
247
+
248
+ `compression_level` can be used to tweak the compression level used when creating archives. Consider that this
249
+ does not affect the contents of `zips`, only `srcs`.
246
250
"""
247
251
internal = _make_internal (name )
248
252
zip_filename = zip_filename or name
@@ -265,6 +269,7 @@ def codeql_pack(
265
269
name = internal (kind + "-zip-base" ),
266
270
srcs = [internal (kind )],
267
271
visibility = ["//visibility:private" ],
272
+ compression_level = compression_level ,
268
273
)
269
274
_zipmerge (
270
275
name = internal (kind + "-zip" ),
@@ -282,6 +287,7 @@ def codeql_pack(
282
287
visibility = ["//visibility:private" ],
283
288
package_dir = name ,
284
289
package_file_name = name + "-" + (_detect_platform () if kind == "arch" else "generic" ) + ".zip" ,
290
+ compression_level = compression_level ,
285
291
)
286
292
if zips :
287
293
_imported_zips_manifest (
0 commit comments