Skip to content

Commit

Permalink
[bazel] Move pinned browsers to MODULE
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Mar 23, 2024
1 parent f1041d9 commit 76956e3
Show file tree
Hide file tree
Showing 6 changed files with 575 additions and 95 deletions.
30 changes: 29 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bazel_dep(name = "aspect_rules_esbuild", version = "0.18.0")
bazel_dep(name = "aspect_rules_js", version = "1.35.0")
bazel_dep(name = "aspect_rules_ts", version = "2.1.0")
bazel_dep(name = "bazel_features", version = "1.9.0")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0")
bazel_dep(name = "contrib_rules_jvm", version = "0.24.0")
bazel_dep(name = "platforms", version = "0.0.8")
Expand Down Expand Up @@ -328,4 +329,31 @@ crate.from_cargo(
use_repo(crate, "crates")

selenium_manager_artifacts = use_extension("//common:selenium_manager.bzl", "selenium_manager_artifacts")
use_repo(selenium_manager_artifacts, "download_sm_linux", "download_sm_macos", "download_sm_windows")
use_repo(
selenium_manager_artifacts,
"download_sm_linux",
"download_sm_macos",
"download_sm_windows",
)

pin_browsers_extension = use_extension("//common:repositories.bzl", "pin_browsers_extension")
use_repo(
pin_browsers_extension,
"linux_firefox",
"mac_firefox",
"linux_beta_firefox",
"mac_beta_firefox",
"linux_geckodriver",
"mac_geckodriver",
"linux_edge",
"mac_edge",
"linux_edgedriver",
"mac_edgedriver",
"linux_chrome",
"mac_chrome",
"linux_chromedriver",
"mac_chromedriver",
)

local_drivers = use_repo_rule("//common/private:drivers.bzl", "local_drivers")
local_drivers(name = "local_drivers")
281 changes: 250 additions & 31 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_depende
rules_closure_dependencies()

rules_closure_toolchains()

load("//common:repositories.bzl", "pin_browsers")

pin_browsers()
5 changes: 1 addition & 4 deletions common/private/drivers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ def _local_drivers_impl(repository_ctx):

repository_ctx.file("BUILD.bazel", "\n".join(contents))

_local_drivers = repository_rule(
local_drivers = repository_rule(
_local_drivers_impl,
)

def local_drivers():
_local_drivers(name = "local_drivers")
Loading

0 comments on commit 76956e3

Please sign in to comment.