Skip to content

Commit 04f6deb

Browse files
committed
Swift: fix bazel packaging
1 parent dbdf6ea commit 04f6deb

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

swift/BUILD.bazel

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,6 @@ pkg_files(
2323
],
2424
)
2525

26-
pkg_files(
27-
name = "scripts",
28-
srcs = ["tools/qltest.sh", "tools/autobuild.sh"],
29-
attributes = pkg_attributes(mode = "0755"),
30-
prefix = "tools",
31-
)
32-
33-
pkg_files(
34-
name = "tracing-config",
35-
srcs = ["tools/tracing-config.lua"],
36-
prefix = "tools",
37-
)
38-
3926
pkg_files(
4027
name = "manifest",
4128
srcs = ["codeql-extractor.yml"],
@@ -46,8 +33,7 @@ pkg_filegroup(
4633
srcs = [
4734
":dbscheme_files",
4835
":manifest",
49-
":tracing-config",
50-
":scripts",
36+
"//swift/tools",
5137
],
5238
visibility = ["//visibility:public"],
5339
)
@@ -79,7 +65,7 @@ pkg_filegroup(
7965
] + select({
8066
"@platforms//os:linux": [],
8167
"@platforms//os:macos": [
82-
":xcode-autobuilder"
68+
":xcode-autobuilder",
8369
],
8470
}),
8571
visibility = ["//visibility:public"],
@@ -101,7 +87,7 @@ pkg_install(
10187

10288
py_binary(
10389
name = "create-extractor-pack",
104-
srcs = ["tools/create_extractor_pack.py"],
105-
main = "tools/create_extractor_pack.py",
90+
srcs = ["create_extractor_pack.py"],
91+
main = "create_extractor_pack.py",
10692
deps = [":_create_extractor_pack"],
10793
)

swift/tools/BUILD.bazel

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
package(default_visibility = ["//visibility:public"])
2-
3-
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_files")
1+
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files")
42

53
sh_binary(
64
name = "qltest",
75
srcs = ["qltest.sh"],
6+
visibility = ["//swift/tools/test/qltest:__pkg__"],
87
)
98

109
sh_binary(
@@ -13,11 +12,26 @@ sh_binary(
1312
)
1413

1514
pkg_files(
16-
name = "tools",
15+
name = "scripts",
1716
srcs = [
1817
":autobuild",
1918
":qltest",
2019
],
2120
attributes = pkg_attributes(mode = "0755"),
2221
prefix = "tools",
2322
)
23+
24+
pkg_files(
25+
name = "tracing-config",
26+
srcs = ["tracing-config.lua"],
27+
prefix = "tools",
28+
)
29+
30+
pkg_filegroup(
31+
name = "tools",
32+
srcs = [
33+
":scripts",
34+
":tracing-config",
35+
],
36+
visibility = ["//swift:__pkg__"],
37+
)

0 commit comments

Comments
 (0)