Skip to content

Commit 83f3bc9

Browse files
authored
refactor: simplify with multitool fix from @fmeum (#434)
Mimics buildbuddy-io/bazel_env.bzl#37
1 parent d9ddd83 commit 83f3bc9

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bazel_dep(name = "rules_cc", version = "0.1.1")
2626
bazel_dep(name = "rules_go", version = "0.50.1")
2727
bazel_dep(name = "rules_java", version = "8.6.1")
2828
bazel_dep(name = "rules_jvm_external", version = "6.3")
29-
bazel_dep(name = "rules_multitool", version = "0.12.0")
29+
bazel_dep(name = "rules_multitool", version = "1.3.0")
3030
bazel_dep(name = "rules_nodejs", version = "6.3.5")
3131
bazel_dep(name = "rules_oci", version = "2.0.1")
3232
bazel_dep(name = "rules_pkg", version = "1.0.1")

tools/BUILD.bazel

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
load("@aspect_bazel_lib//lib:testing.bzl", "assert_json_matches")
21
load("@bazel_env.bzl", "bazel_env")
3-
load("@bazel_skylib//rules:write_file.bzl", "write_file")
2+
load("@multitool//:tools.bzl", MULTITOOLS = "TOOLS")
43
load("@npm//:defs.bzl", "npm_link_all_packages")
54
load("@npm//tools:@angular/cli/package_json.bzl", angular_cli = "bin")
65
load("@npm//tools:svg-term-cli/package_json.bzl", svg_term_cli = "bin")
@@ -11,29 +10,6 @@ svg_term_cli.svg_term_binary(name = "svg-term")
1110

1211
angular_cli.ng_binary(name = "ng")
1312

14-
MULTITOOLS = [
15-
"buf",
16-
"buildozer",
17-
"docker-compose",
18-
"ibazel",
19-
"multitool",
20-
"terraform",
21-
]
22-
23-
# Workaround https://github.com/buildbuddy-io/bazel_env.bzl/issues/32
24-
write_file(
25-
name = "listed_multitools",
26-
out = "listed_multitools.json",
27-
content = [json.encode(MULTITOOLS)],
28-
)
29-
30-
assert_json_matches(
31-
name = "multitools",
32-
file1 = "tools.lock.json",
33-
file2 = "listed_multitools",
34-
filter1 = """keys | map(select(. != "$schema"))""",
35-
)
36-
3713
# Tools found in this package
3814
LOCAL_TOOLS = [
3915
"ng",

0 commit comments

Comments
 (0)