Skip to content

Commit 577ac8d

Browse files
authored
Update to Bazel 7 (#200)
* Update to Bazel 7 * Disable lockfile support, as Renovate doesn't support them yet. * Use chromedriver and chrome directly. Avoid copying and linking, as this is dependent on internal filesystem layout behavior in Bazel.
1 parent 5df4fa9 commit 577ac8d

File tree

5 files changed

+13
-22
lines changed

5 files changed

+13
-22
lines changed

.bazelrc

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
# TODO Re-enable lockfile when supported by Renovate
2+
# Blocked by https://github.com/renovatebot/renovate/issues/25557
3+
14
# honor the setting of `skipLibCheck` in the tsconfig.json file; parameter required for aspect_rules_ts.
2-
build --enable_bzlmod --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
3-
fetch --enable_bzlmod --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
4-
query --enable_bzlmod --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
5+
build --lockfile_mode=off --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
6+
fetch --lockfile_mode=off --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
7+
query --lockfile_mode=off --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.4.0
1+
7.0.0

build_defs/chromium.bzl

+2-14
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ def chromium_data_dependencies():
1414
name = "chromedriver",
1515
build_file_content =
1616
"""
17-
genrule(
18-
name = "chromedriver",
19-
srcs = [":chromedriver_linux64/chromedriver"],
20-
outs = ["chromedriver.bin"],
21-
cmd = "ln $(location //:chromedriver_linux64/chromedriver) $@",
22-
visibility = ["//visibility:public"],
23-
)
17+
exports_files(["chromedriver_linux64/chromedriver"])
2418
""",
2519
sha256 = "30c27c17133bf3622f0716e1bc70017dc338a6920ea1b1f3eb15f407150b927c",
2620
# File within archive: chromedriver_linux64/chromedriver
@@ -32,13 +26,7 @@ genrule(
3226
name = "chromium",
3327
build_file_content =
3428
"""
35-
genrule(
36-
name = "chromium",
37-
srcs = [":chrome-linux/chrome"],
38-
outs = ["chromium.bin"],
39-
cmd = "ln $(location //:chrome-linux/chrome) $@",
40-
visibility = ["//visibility:public"],
41-
)
29+
exports_files(["chrome-linux/chrome"])
4230
""",
4331
sha256 = "53899aaf90d9b9768dbc54beb869a314bdc8f4d04c2ef7bab2cb480581cfa197",
4432
# File within archive: chrome-linux/chrome

test/e2e/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ go_test(
99
data = [
1010
"//:chrome-ssh-agent.zip",
1111
"//:chrome-ssh-agent-beta.zip",
12-
"@chromedriver",
13-
"@chromium",
12+
"@chromedriver//:chromedriver_linux64/chromedriver",
13+
"@chromium//:chrome-linux/chrome",
1414
],
1515
importpath = "github.com/google/chrome-ssh-agent/test",
1616
deps = [

test/e2e/e2e.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
)
1818

1919
var (
20-
chromeDriverPath = testutil.MustRunfile("_main~chromium_dependencies~chromedriver/chromedriver.bin")
21-
chromePath = testutil.MustRunfile("_main~chromium_dependencies~chromium/chromium.bin")
20+
chromeDriverPath = testutil.MustRunfile("_main~chromium_dependencies~chromedriver/chromedriver_linux64/chromedriver")
21+
chromePath = testutil.MustRunfile("_main~chromium_dependencies~chromium/chrome-linux/chrome")
2222
)
2323

2424
func getElementText(wd selenium.WebDriver, id string) (string, error) {

0 commit comments

Comments
 (0)