-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support specifying multiple download URLs in tool_versions. (#1145
) The interface of `repository_ctx.download` and `repository_ctx.download_and_extract` supports string lists as well as strings as the value of the `url` argument. This is the ultimate destination of the `url` attribute in the `tool_versions` dictionary, so it makes sense for it to support lists as well. It is often useful to provide multiple download URLs, e.g. when vendoring deps through a mirror (to guard against issues like [git archive checksums changing](https://github.blog/changelog/2023-01-30-git-archive-checksums-may-change/) while still keeping the canonical download URL) or in an airgapped setting (to support internal URLs alongside external URLs). This is also pretty common around Bazel repository rules that download things, e.g. [http_archive](https://bazel.build/rules/lib/repo/http#http_archive-urls), so it can be expected to work with `tool_versions` too.
- Loading branch information
Showing
2 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters