File tree Expand file tree Collapse file tree 3 files changed +26
-26
lines changed
Expand file tree Collapse file tree 3 files changed +26
-26
lines changed Original file line number Diff line number Diff line change 11load ("@rules_pkg//pkg:mappings.bzl" , "pkg_filegroup" , "pkg_files" )
2- load ("@semmle_code//:dist.bzl" , "dist" , "pack_zip" )
3- load ("//:defs.bzl" , "codeql_platform" )
2+ load ("//misc/bazel:pkg.bzl" , "codeql_pack" , "codeql_pkg_files" )
43
54package (default_visibility = ["//visibility:public" ])
65
@@ -37,25 +36,22 @@ pkg_files(
3736 strip_prefix = None ,
3837)
3938
40- dist (
41- name = "extractor-generic" ,
39+ codeql_pkg_files (
40+ name = "extractor-arch" ,
41+ exes = [
42+ "//python/extractor/tsg-python" ,
43+ ],
44+ prefix = "tools/{CODEQL_PLATFORM}" ,
45+ )
46+
47+ codeql_pack (
48+ name = "python" ,
4249 srcs = [
4350 ":codeql-extractor-yml" ,
4451 ":dbscheme-group" ,
52+ ":extractor-arch" ,
4553 "//python/downgrades" ,
4654 "//python/extractor" ,
4755 "//python/tools" ,
4856 ],
49- prefix = "python" ,
50- visibility = ["//visibility:public" ],
51- )
52-
53- pack_zip (
54- name = "extractor-arch" ,
55- srcs = [
56- "//python/extractor/tsg-python" ,
57- ],
58- package_file_name = "extractor-" + codeql_platform + ".zip" ,
59- prefix = "python/tools/" + codeql_platform ,
60- visibility = ["//visibility:public" ],
6157)
Original file line number Diff line number Diff line change 1- load ("@semmle_code//:dist .bzl" , "pack_zip " )
1+ load ("//misc/bazel:pkg .bzl" , "codeql_pkg_files" , "strip_prefix " )
22
33py_binary (
44 name = "make-zips-py" ,
@@ -31,7 +31,7 @@ genrule(
3131 tools = [":make-zips-py" ],
3232)
3333
34- pack_zip (
34+ codeql_pkg_files (
3535 name = "extractor" ,
3636 srcs = [
3737 "LICENSE-PSF.md" , # because we distribute imp.py
@@ -44,5 +44,6 @@ pack_zip(
4444 ":python3src" ,
4545 ] + glob (["data/**" ]),
4646 prefix = "tools" ,
47- visibility = ["//visibility:public" ],
47+ strip_prefix = strip_prefix .from_pkg (),
48+ visibility = ["//python:__pkg__" ],
4849)
Original file line number Diff line number Diff line change 1- load ("@semmle_code//:dist .bzl" , "pack_zip " )
1+ load ("//misc/bazel:pkg .bzl" , "codeql_pkg_files " )
22
3- pack_zip (
3+ codeql_pkg_files (
44 name = "tools" ,
5- srcs = glob (["**/*" ]),
6- excludes = [
7- "BUILD.bazel" ,
8- ] + glob (["recorded-call-graph-metrics/**" ]),
5+ exes = glob (
6+ ["**/*" ],
7+ exclude = [
8+ "BUILD.bazel" ,
9+ "recorded-call-graph-metrics/**" ,
10+ ],
11+ ),
912 prefix = "tools" ,
10- visibility = ["//visibility:public " ],
13+ visibility = ["//python:__pkg__ " ],
1114)
You can’t perform that action at this time.
0 commit comments