@@ -284,19 +284,19 @@ def codeql_pack(
284
284
install_dest = "extractor-pack" ,
285
285
compression_level = None ,
286
286
arch_overrides = None ,
287
- prefix_override = None ,
287
+ zip_prefix = None ,
288
288
** kwargs ):
289
289
"""
290
290
Define a codeql pack. This macro accepts `pkg_files`, `pkg_filegroup` or their `codeql_*` counterparts as `srcs`.
291
291
`zips` is a map from `.zip` files to prefixes to import.
292
292
* defines a `<name>-generic-zip` target creating a `<zip_filename>-generic.zip` archive with the generic bits,
293
- prefixed with `name `
293
+ prefixed with `zip_prefix `
294
294
* defines a `<name>-arch-zip` target creating a `<zip_filename>-<codeql_platform>.zip` archive with the
295
- arch-specific bits, prefixed with `name `
295
+ arch-specific bits, prefixed with `zip_prefix `
296
296
* defines a runnable `<name>-installer` target that will install the pack in `install_dest`, relative to where the
297
297
rule is used. The install destination can be overridden appending `-- --destdir=...` to the `bazel run`
298
- invocation. This installation _does not_ prefix the contents with `name `.
299
- The prefix for the zip files can be overriden with `prefix_override` .
298
+ invocation. This installation _does not_ prefix the contents with `zip_prefix `.
299
+ The prefix for the zip files can be set with `zip_prefix`, it is `name` by default .
300
300
301
301
The distinction between arch-specific and generic contents is made based on whether the paths (including possible
302
302
prefixes added by rules) contain the special `{CODEQL_PLATFORM}` placeholder, which in case it is present will also
@@ -310,9 +310,8 @@ def codeql_pack(
310
310
internal = _make_internal (name )
311
311
zip_filename = zip_filename or name
312
312
zips = zips or {}
313
- prefix = name
314
- if prefix_override != None :
315
- prefix = prefix_override
313
+ if zip_prefix == None :
314
+ zip_prefix = name
316
315
pkg_filegroup (
317
316
name = internal ("all" ),
318
317
srcs = srcs ,
@@ -350,15 +349,15 @@ def codeql_pack(
350
349
name = internal (kind , "zip" ),
351
350
srcs = [internal (kind , "zip-base" ), internal (kind , "zip-info" )],
352
351
out = _get_zip_filename (name , kind ),
353
- prefix = prefix ,
352
+ prefix = zip_prefix ,
354
353
visibility = visibility ,
355
354
)
356
355
else :
357
356
pkg_zip (
358
357
name = internal (kind , "zip" ),
359
358
srcs = [internal (kind )],
360
359
visibility = visibility ,
361
- package_dir = prefix ,
360
+ package_dir = zip_prefix ,
362
361
package_file_name = _get_zip_filename (name , kind ),
363
362
compression_level = compression_level ,
364
363
)
0 commit comments