Bazel: add codeql specific packaging library

This encapsulate arch specific logic, local installation and separation
of zip files into generic and arch-specific parts as required by the
internal build.
This commit is contained in:
Paolo Tranquilli
2024-05-06 11:54:56 +02:00
parent 8ae607cdce
commit 60cf77be7e
8 changed files with 361 additions and 134 deletions

View File

@@ -1,4 +1,4 @@
load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files")
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")
sh_binary(
name = "qltest",
@@ -16,29 +16,17 @@ sh_binary(
srcs = ["identify-environment.sh"],
)
pkg_files(
name = "scripts",
codeql_pkg_files(
name = "tools",
srcs = [
"autobuild.cmd",
"tracing-config.lua",
],
exes = [
":autobuild",
":identify-environment",
":qltest",
],
attributes = pkg_attributes(mode = "0755"),
prefix = "tools",
)
pkg_files(
name = "tracing-config",
srcs = ["tracing-config.lua"],
prefix = "tools",
)
pkg_filegroup(
name = "tools",
srcs = [
":scripts",
":tracing-config",
],
visibility = ["//swift:__pkg__"],
)