Skip to content

Commit

Permalink
Update set_up_clean_test scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrindel committed Jun 2, 2024
1 parent d52796d commit ddd6537
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
11 changes: 10 additions & 1 deletion examples/interesting_deps/set_up_clean_test
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ gazelle_binary(
gazelle(
name = "update_build_files",
data = [
"@swift_deps_info//:swift_deps_index",
],
extra_args = [
"-swift_dependency_index=\$(location @swift_deps_info//:swift_deps_index)",
],
gazelle = ":gazelle_bin",
)
Expand All @@ -49,8 +55,11 @@ swift_binary(
srcs = ["main.swift"],
visibility = ["//swift:__subpackages__"],
deps = [
"@swiftpkg_cocoalumberjack//:CocoaLumberjackSwiftLogBackend",
"@swiftpkg_geoswift//:GEOSwift",
"@swiftpkg_libwebp_xcode//:libwebp",
"@swiftpkg_swift_log//:Sources_Logging",
"@swiftpkg_opencombine//:OpenCombine",
"@swiftpkg_swift_log//:Logging",
],
)
Expand Down
13 changes: 13 additions & 0 deletions examples/objc_code/set_up_clean_test
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ cat > "${script_dir}/BUILD.bazel" <<-EOF
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
load("@cgrindel_bazel_starlib//bzltidy:defs.bzl", "tidy")
tidy(
name = "tidy",
targets = [
":update_build_files",
],
)
# MARK: - Gazelle
# Ignore the Swift build folder
Expand All @@ -35,6 +42,12 @@ gazelle_binary(
gazelle(
name = "update_build_files",
data = [
"@swift_deps_info//:swift_deps_index",
],
extra_args = [
"-swift_dependency_index=\$(location @swift_deps_info//:swift_deps_index)",
],
gazelle = ":gazelle_bin",
)
Expand Down
9 changes: 5 additions & 4 deletions examples/vapor_example/set_up_clean_test
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ EOF
# Add back a minimal build file at the root
cat > "${script_dir}/BUILD.bazel" <<-EOF
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@cgrindel_bazel_starlib//bzltidy:defs.bzl", "tidy")
tidy(
Expand All @@ -45,12 +44,14 @@ gazelle_binary(
gazelle(
name = "update_build_files",
args = [
"-swift_dependency_index=swift/deps_index.json",
data = [
"@swift_deps_info//:swift_deps_index",
],
extra_args = [
"-swift_dependency_index=\$(location @swift_deps_info//:swift_deps_index)",
],
gazelle = ":gazelle_bin",
)
EOF

cat > "${script_dir}/swift/BUILD.bazel" <<-EOF
Expand Down
6 changes: 6 additions & 0 deletions examples/xcmetrics_example/set_up_clean_test
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ gazelle_binary(
gazelle(
name = "update_build_files",
data = [
"@swift_deps_info//:swift_deps_index",
],
extra_args = [
"-swift_dependency_index=\$(location @swift_deps_info//:swift_deps_index)",
],
gazelle = ":gazelle_bin",
)
Expand Down

0 comments on commit ddd6537

Please sign in to comment.