Skip to content

Commit

Permalink
fix: digest output should include algo
Browse files Browse the repository at this point in the history
Hashes should generally be prefixed with the hash algorithm used.
Also, the intent of adding .digest in #346 was to make the migration from rules_docker easier, so we should match its output, as shown
https://github.com/bazelbuild/rules_docker/blob/master/tests/container/BUILD#L248-L251

Note, this is not a breaking change, because the commit from #346 was not yet released.
  • Loading branch information
alexeagle committed Sep 13, 2023
1 parent 3dcec99 commit af201c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oci/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def oci_image(name, labels = None, annotations = None, env = None, **kwargs):
name = name + ".digest",
args = ["--raw-output"],
srcs = ["_{}_index.json".format(name)],
filter = """.manifests[0].digest | sub("^sha256:"; "")""",
filter = """.manifests[0].digest""",
out = name + ".json.sha256", # path chosen to match rules_docker for easy migration
)

Expand Down

0 comments on commit af201c8

Please sign in to comment.