Skip to content

Commit 5d43cc9

Browse files
1 parent 0ebddb1 commit 5d43cc9

File tree

6 files changed

+145
-1
lines changed

6 files changed

+145
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
"aspect-build/bazel-lib"
2+
3+
module(
4+
name = "aspect_bazel_lib",
5+
version = "2.6.0",
6+
bazel_compatibility = [">=6.0.0"],
7+
compatibility_level = 1,
8+
)
9+
10+
# Lower-bound versions of our dependencies
11+
bazel_dep(name = "bazel_skylib", version = "1.5.0")
12+
bazel_dep(name = "platforms", version = "0.0.8")
13+
14+
# 0.5.4 is the first version with bzlmod support
15+
bazel_dep(name = "stardoc", version = "0.5.4", repo_name = "io_bazel_stardoc")
16+
17+
bazel_lib_toolchains = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")
18+
bazel_lib_toolchains.copy_directory()
19+
bazel_lib_toolchains.copy_to_directory()
20+
bazel_lib_toolchains.jq()
21+
bazel_lib_toolchains.yq()
22+
bazel_lib_toolchains.coreutils()
23+
bazel_lib_toolchains.tar()
24+
bazel_lib_toolchains.expand_template()
25+
bazel_lib_toolchains.bats()
26+
use_repo(bazel_lib_toolchains, "bats_toolchains", "bsd_tar_toolchains", "copy_directory_toolchains", "copy_to_directory_toolchains", "coreutils_toolchains", "expand_template_toolchains", "jq_toolchains", "yq_toolchains")
27+
28+
register_toolchains(
29+
"@copy_directory_toolchains//:all",
30+
"@copy_to_directory_toolchains//:all",
31+
"@jq_toolchains//:all",
32+
"@yq_toolchains//:all",
33+
"@coreutils_toolchains//:all",
34+
"@expand_template_toolchains//:all",
35+
"@bats_toolchains//:all",
36+
# Expand bsd_tar_toolchains
37+
"@bsd_tar_toolchains//:linux_amd64_toolchain",
38+
"@bsd_tar_toolchains//:linux_arm64_toolchain",
39+
"@bsd_tar_toolchains//:windows_amd64_toolchain",
40+
# host toolchain must be last, as it's only suitable as a fallback on macos
41+
"@bsd_tar_toolchains//:host_toolchain",
42+
)
43+
44+
host = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "host", dev_dependency = True)
45+
host.host()
46+
use_repo(host, "aspect_bazel_lib_host")
47+
48+
# To allow /tools to be built from source
49+
# NOTE: when publishing to BCR, we patch this to be dev_dependency, as we publish pre-built binaries
50+
# along with our releases.
51+
52+
bazel_dep(
53+
name = "gazelle",
54+
version = "0.33.0",
55+
dev_dependency = True,
56+
)
57+
bazel_dep(
58+
name = "rules_go",
59+
version = "0.41.0",
60+
repo_name = "io_bazel_rules_go",
61+
dev_dependency = True,
62+
)
63+
64+
go_deps = use_extension(
65+
"@gazelle//:extensions.bzl",
66+
"go_deps",
67+
dev_dependency = True,
68+
)
69+
go_deps.from_file(go_mod = "//:go.mod")
70+
use_repo(
71+
go_deps,
72+
"com_github_bmatcuk_doublestar_v4",
73+
"org_golang_x_exp",
74+
)
75+
76+
# Development-only dependencies
77+
78+
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True)
79+
bazel_dep(name = "buildifier_prebuilt", version = "6.3.3", dev_dependency = True)
80+
bazel_dep(name = "bazel_features", version = "0.2.0", dev_dependency = True)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/MODULE.bazel b/MODULE.bazel
2+
index e63fa5b..9d78a88 100644
3+
--- a/MODULE.bazel
4+
+++ b/MODULE.bazel
5+
@@ -50,19 +50,19 @@ use_repo(host, "aspect_bazel_lib_host")
6+
bazel_dep(
7+
name = "gazelle",
8+
version = "0.33.0",
9+
- # In released versions: dev_dependency = True
10+
+ dev_dependency = True,
11+
)
12+
bazel_dep(
13+
name = "rules_go",
14+
version = "0.41.0",
15+
repo_name = "io_bazel_rules_go",
16+
- # In released versions: dev_dependency = True
17+
+ dev_dependency = True,
18+
)
19+
20+
go_deps = use_extension(
21+
"@gazelle//:extensions.bzl",
22+
"go_deps",
23+
- # In released versions: dev_dependency = True
24+
+ dev_dependency = True,
25+
)
26+
go_deps.from_file(go_mod = "//:go.mod")
27+
use_repo(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
===================================================================
2+
--- a/MODULE.bazel
3+
+++ b/MODULE.bazel
4+
@@ -1,9 +1,9 @@
5+
"aspect-build/bazel-lib"
6+
7+
module(
8+
name = "aspect_bazel_lib",
9+
- version = "0.0.0",
10+
+ version = "2.6.0",
11+
bazel_compatibility = [">=6.0.0"],
12+
compatibility_level = 1,
13+
)
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
bcr_test_module:
2+
module_path: "e2e/smoke"
3+
matrix:
4+
platform: ["debian10", "macos", "ubuntu2004", "windows"]
5+
bazel: ["7.x", "6.x"]
6+
tasks:
7+
run_tests:
8+
name: "Run test module"
9+
platform: ${{ platform }}
10+
bazel: ${{ bazel }}
11+
test_targets:
12+
- "//..."
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"integrity": "sha256-PgpDCtqbjw+EV2eiZ89YS8lLjsZC1gk/Mdyjk4sY9qE=",
3+
"strip_prefix": "bazel-lib-2.6.0",
4+
"url": "https://github.com/aspect-build/bazel-lib/releases/download/v2.6.0/bazel-lib-v2.6.0.tar.gz",
5+
"patches": {
6+
"go_dev_dep.patch": "sha256-KgABwDzOT+DugUHn9tHLOz05osnk2FLsS10d5zqG/M0=",
7+
"module_dot_bazel_version.patch": "sha256-qSIbSBOVaz8zZVOmdy/KRrQfVeqMnziGnF1aoJomWx4="
8+
},
9+
"patch_strip": 1
10+
}

modules/aspect_bazel_lib/metadata.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
"2.5.0",
113113
"2.5.1",
114114
"2.5.2",
115-
"2.5.3"
115+
"2.5.3",
116+
"2.6.0"
116117
],
117118
"yanked_versions": {
118119
"1.31.0": "1.31.0 has a breaking change to the default yq version",

0 commit comments

Comments
 (0)