Skip to content

Commit 85a77ad

Browse files
Publish aspect-build/[email protected] (bazelbuild#1035)
Co-authored-by: Derek Cormier <[email protected]>
1 parent 5fb5471 commit 85a77ad

File tree

6 files changed

+140
-1
lines changed

6 files changed

+140
-1
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
"aspect-build/bazel-lib"
2+
3+
module(
4+
name = "aspect_bazel_lib",
5+
version = "2.0.0-rc1",
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.4.2")
12+
bazel_dep(name = "platforms", version = "0.0.7")
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+
use_repo(bazel_lib_toolchains, "bsd_tar_toolchains", "copy_directory_toolchains", "copy_to_directory_toolchains", "coreutils_toolchains", "expand_template_toolchains", "jq_toolchains", "yq_toolchains")
26+
27+
register_toolchains(
28+
"@copy_directory_toolchains//:all",
29+
"@copy_to_directory_toolchains//:all",
30+
"@jq_toolchains//:all",
31+
"@yq_toolchains//:all",
32+
"@coreutils_toolchains//:all",
33+
"@expand_template_toolchains//:all",
34+
# Expand bsd_tar_toolchains
35+
"@bsd_tar_toolchains//:linux_amd64_toolchain",
36+
"@bsd_tar_toolchains//:linux_arm64_toolchain",
37+
"@bsd_tar_toolchains//:windows_amd64_toolchain",
38+
# host toolchain must be last, as it's only suitable as a fallback on macos
39+
"@bsd_tar_toolchains//:host_toolchain",
40+
)
41+
42+
host = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "host", dev_dependency = True)
43+
host.host()
44+
use_repo(host, "aspect_bazel_lib_host")
45+
46+
# To allow /tools to be built from source
47+
# NOTE: when publishing to BCR, we patch this to be dev_dependency, as we publish pre-built binaries
48+
# along with our releases.
49+
50+
bazel_dep(
51+
name = "gazelle",
52+
version = "0.33.0",
53+
dev_dependency = True,
54+
)
55+
bazel_dep(
56+
name = "rules_go",
57+
version = "0.41.0",
58+
repo_name = "io_bazel_rules_go",
59+
dev_dependency = True,
60+
)
61+
62+
go_deps = use_extension(
63+
"@gazelle//:extensions.bzl",
64+
"go_deps",
65+
dev_dependency = True,
66+
)
67+
go_deps.from_file(go_mod = "//:go.mod")
68+
use_repo(
69+
go_deps,
70+
"com_github_bmatcuk_doublestar_v4",
71+
"org_golang_x_exp",
72+
)
73+
74+
# Development-only dependencies
75+
76+
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
77+
bazel_dep(name = "buildifier_prebuilt", version = "6.3.3", dev_dependency = True)
Lines changed: 27 additions & 0 deletions
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(
Lines changed: 14 additions & 0 deletions
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.0.0-rc1",
11+
bazel_compatibility = [">=6.0.0"],
12+
compatibility_level = 1,
13+
)
14+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bcr_test_module:
2+
module_path: "e2e/smoke"
3+
matrix:
4+
platform: ["debian10", "macos", "ubuntu2004", "windows"]
5+
tasks:
6+
run_tests:
7+
name: "Run test module"
8+
platform: ${{ platform }}
9+
test_targets:
10+
- "//..."
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"integrity": "sha256-oYXM/5wbhYnGP2bX65CN4Vxda7BVYr5fRjNsU+enMmo=",
3+
"strip_prefix": "bazel-lib-2.0.0-rc1",
4+
"url": "https://github.com/aspect-build/bazel-lib/releases/download/v2.0.0-rc1/bazel-lib-v2.0.0-rc1.tar.gz",
5+
"patches": {
6+
"go_dev_dep.patch": "sha256-KgABwDzOT+DugUHn9tHLOz05osnk2FLsS10d5zqG/M0=",
7+
"module_dot_bazel_version.patch": "sha256-D8eqS9FdlC4GIXwmDbiB1dJ6bvFOjn4n8mRAVIazXqU="
8+
},
9+
"patch_strip": 1
10+
}

modules/aspect_bazel_lib/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
"2.0.0-beta0",
8383
"1.36.0",
8484
"2.0.0-beta1",
85-
"2.0.0-rc0"
85+
"2.0.0-rc0",
86+
"2.0.0-rc1"
8687
],
8788
"yanked_versions": {
8889
"1.31.0": "1.31.0 has a breaking change to the default yq version",

0 commit comments

Comments
 (0)