Skip to content

Commit

Permalink
chore: bump minimum bazel-lib
Browse files Browse the repository at this point in the history
Pick up the change to execution requirements.
Fixes #425
  • Loading branch information
alexeagle committed Dec 22, 2023
1 parent 6a22369 commit 078b3ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "aspect_bazel_lib", version = "1.35.0")
# Minimum 1.36.0 to include https://github.com/aspect-build/bazel-lib/pull/594
bazel_dep(name = "aspect_bazel_lib", version = "1.36.0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "platforms", version = "0.0.5")

Expand Down
6 changes: 3 additions & 3 deletions oci/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def rules_oci_dependencies():

http_archive(
name = "aspect_bazel_lib",
sha256 = "e9505bd956da64b576c433e4e41da76540fd8b889bbd17617fe480a646b1bfb9",
strip_prefix = "bazel-lib-1.35.0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.35.0/bazel-lib-v1.35.0.tar.gz",
sha256 = "4d6010ca5e3bb4d7045b071205afa8db06ec11eb24de3f023d74d77cca765f66",
strip_prefix = "bazel-lib-1.39.0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.39.0/bazel-lib-v1.39.0.tar.gz",
)
8 changes: 4 additions & 4 deletions oci/private/pull.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _IMAGE_REFERENCE_ATTRS = {
),
"config": attr.label(
# TODO(2.0): remove
doc = "Label to a .docker/config.json file. `config` attribute overrides `config_path` attribute. DEPRECATED, will be removed in 2.0",
doc = "Label to a .docker/ file. `config` attribute overrides `config_path` attribute. DEPRECATED, will be removed in 2.0",
allow_single_file = True,
),
"config_path": attr.label(
Expand Down Expand Up @@ -385,7 +385,7 @@ def _oci_pull_impl(rctx):
if manifest["mediaType"] in _SUPPORTED_MEDIA_TYPES["manifest"]:
if rctx.attr.platform:
fail("{}/{} is a single-architecture image, so attribute 'platforms' should not be set.".format(rctx.attr.registry, rctx.attr.repository))

elif manifest["mediaType"] in _SUPPORTED_MEDIA_TYPES["index"]:
if not rctx.attr.platform:
fail("{}/{} is a multi-architecture image, so attribute 'platforms' is required.".format(rctx.attr.registry, rctx.attr.repository))
Expand Down Expand Up @@ -417,10 +417,10 @@ def _oci_pull_impl(rctx):
media_type = manifest["mediaType"],
size = size,
digest = digest,
platform = rctx.attr.platform
platform = rctx.attr.platform,
))
rctx.file("oci-layout", json.encode_indent({"imageLayoutVersion": "1.0.0"}, indent = " "))

rctx.file("BUILD.bazel", content = _BUILD_FILE_TMPL.format(
target_name = rctx.attr.target_name,
tars = tars,
Expand Down

0 comments on commit 078b3ed

Please sign in to comment.