Skip to content

Commit 6c28c79

Browse files
authored
Add test sources to release archive (#6236)
Leftover from 819fbaf.
1 parent 819fbaf commit 6c28c79

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

BUILD

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,20 @@ cc_library(
188188
# Linting
189189

190190
filegroup(
191-
name = "LintInputs",
191+
name = "SourceFiles",
192192
srcs = glob([
193-
"Plugins/**/*.swift",
194193
"Source/**/*.swift",
195-
]) + [
194+
]),
195+
visibility = ["//Tests:__subpackages__"],
196+
)
197+
198+
filegroup(
199+
name = "LintInputs",
200+
srcs = glob(
201+
["Plugins/**/*.swift"],
202+
allow_empty = True
203+
) + [
204+
":SourceFiles",
196205
".swiftlint.yml",
197206
"Package.swift",
198207
"//Tests:TestSources",
@@ -205,13 +214,13 @@ filegroup(
205214
filegroup(
206215
name = "release_files",
207216
srcs = [
217+
":SourceFiles",
208218
"BUILD",
209219
"LICENSE",
210220
"MODULE.bazel",
211221
"//:DyldWarningWorkaroundSources",
212-
"//:LintInputs",
213-
"//Tests/ExtraRulesTests:BUILD",
214-
"//Tests/TestHelpers:BUILD",
222+
"//Tests/ExtraRulesTests:TestSources",
223+
"//Tests/TestHelpers:TestSources",
215224
"//bazel:release_files",
216225
],
217226
)

Tests/ExtraRulesTests/BUILD

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library", "swift_test")
22
load("//bazel:copts.bzl", "STRICT_COPTS")
33

4-
exports_files(["BUILD"])
4+
filegroup(
5+
name = "TestSources",
6+
srcs = ["BUILD", "ExtraRulesTests.swift"],
7+
visibility = ["//visibility:public"],
8+
)
59

610
genrule(
711
name = "ExtraRulesLinuxMain",

Tests/TestHelpers/BUILD

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
22
load("//bazel:copts.bzl", "STRICT_COPTS")
33

4-
exports_files(["BUILD"])
4+
filegroup(
5+
name = "TestSources",
6+
srcs = ["BUILD"] + glob(["*.swift"]),
7+
visibility = ["//visibility:public"],
8+
)
59

610
swift_library(
711
name = "TestHelpers",

0 commit comments

Comments
 (0)