diff --git a/deps.bzl b/deps.bzl index 7b3e542..ad4fe4c 100644 --- a/deps.bzl +++ b/deps.bzl @@ -2,27 +2,13 @@ # https://stackoverflow.com/questions/47192668/idiomatic-retrieval-of-the-bazel-execution-path# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -BATS_CORE_BUILD=""" -sh_library( - name = "bats_lib", - srcs = glob(["libexec/**"]), -) - -sh_binary( - name = "bats", - srcs = ["bin/bats"], - deps = [":bats_lib"], - visibility = ["//visibility:public"], -) -""" - def bazel_bats_dependencies( version="1.5.0", sha256="36a3fd4413899c0763158ae194329af8f48bb1ff0d1338090b80b3416d5793af", ): http_archive( name = "bats_core", - build_file_content = BATS_CORE_BUILD, + build_file = "@//:third_party/BUILD.bats_core", urls = [ "https://github.com/bats-core/bats-core/archive/refs/tags/v%s.tar.gz" % version, ], diff --git a/third_party/BUILD.bats_core b/third_party/BUILD.bats_core new file mode 100644 index 0000000..b601edc --- /dev/null +++ b/third_party/BUILD.bats_core @@ -0,0 +1,11 @@ +sh_library( + name = "bats_lib", + srcs = glob(["libexec/**"]), +) + +sh_binary( + name = "bats", + srcs = ["bin/bats"], + deps = [":bats_lib"], + visibility = ["//visibility:public"], +)