angular-cn/dev-infra/bazel/browsers/platform_http_file.bzl
Paul Gschwendtner a16f82b851 refactor(dev-infra): move shared browser bazel setup into dedicated bazel folder (#42268)
This change moves the `dev-infra/browsers` folder into `dev-infra/bazel`.
The browser folder is providing custom configuration for Bazel, so it
should live within the `bazel` folder for a more well-structured
`dev-infra` folder.

PR Close #42268
2021-06-03 10:37:41 -07:00

25 lines
835 B
Python

load(
"@io_bazel_rules_webtesting//web/internal:platform_http_file.bzl",
_platform_http_file = "platform_http_file",
)
def platform_http_file(name, licenses, sha256, urls):
"""Platform specific browser repository.
This works around a deficiency in io_bazel_rules_webtesting platform_http_file in that
it selects the platform when the repository rule is executed. This limits browsers
tests to run on the local user platform only. For cross-platform RBE we want a repository
to be defined per platform so the correct one can be selected.
"""
_platform_http_file(
name = name,
amd64_sha256 = sha256,
amd64_urls = urls,
licenses = licenses,
macos_sha256 = sha256,
macos_urls = urls,
windows_sha256 = sha256,
windows_urls = urls,
)