Skip to content

feat: allow custom metadata files

Matthew Clarkson requested to merge retcon into main
download_file(
    name = "example",
    metadata = {
        "//:integrity.tmpl.bzl", ".integrity.bzl",
    },
)

Where integrity.tmpl.bzl is:

visibility("public")

INTEGRITY = "{{integrity}}"

Then @example//:.integrity.bzl" can be used in load statement to read the download integrity.

This patch series also appends canonical data to WORKSPACE, rather than forcefully writing over it, unless metadata is set and we stop that janky practice. We will tidy up this in the next breaking change via #2.

Edited by Matthew Clarkson

Merge request reports

Loading