Commits on Source (22)
-
Matthew Clarkson authored
-
Jonathan Watson authored5011a040
-
Jonathan Watson authored8d26b466
-
```py download_file( name = "example", metadata = { "//:integrity.tmpl.bzl", ".integrity.bzl", }, ) ``` Where `integrity.tmpl.bzl` is: ```py visibility("public") INTEGRITY = "{{integrity}}" ``` Then `@example//:.integrity.bzl"` can be used in `load` statement to read the download integrity.
-
Matthew Clarkson authored
Previously, the canonical arguments were blatted over any previously existing `WORKSPACE`. This was stupid. It now appends to the file if it exists. Eventually, in a breaking change we will remove this functionality as it is superseded by `metadata` attribute.
-
Matthew Clarkson authored
When a user is using `metadata` attribute, we do not write anything to `WORKSPACE`. Eventually, the writing of data to `WORKSPACE` will be removed in a breaking change release.
-
Matthew Clarkson authored
-
Tomer Shterenberg authored062cad43
-
Tomer Shterenberg authored5eda5ce7
-
Tomer Shterenberg authored8de8de34
-
Tomer Shterenberg authorede26adc57
-
Tomer Shterenberg authored049d3cff
-
-
Matthew Clarkson authored
-
Matthew Clarkson authored
-
Matthew Clarkson authored
-
Matthew Clarkson authored
``` ERROR: The repo contents cache [/builds/bazel/download_utils/.cache/bazel/repo/contents] is inside the workspace [/builds/bazel/download_utils]. This can cause spurious failures. Disable the repo contents cache with `--repo_contents_cache=`, or specify `--repo_contents_cache=<path outside the workspace>`. ```
-
Matthew Clarkson authored
When a link is created within a downloaded repository, it needs to be added to the exported files. This behaviour can be overridden by settings `srcs` (if available) or overriding the `BUILD.bazel` template with `build`.
-
Matthew Clarkson authored
Allows easier wrapping of the repository rule as `""` is the default value.
-
Matthew Clarkson authored
```py download = use_extension("@download_utils//download/template:defs.bzl", "download_template") download.archive( name = "coreutils-{version}-{triplet}", srcs = ["entrypoint"], links = { "coreutils{executable.extension}": "entrypoint", }, lock = "//coreutils:lock.json", strip_prefix = "coreutils-{version}-{rust.triplet}", substitutions = { "version": [ "0.0.28", "0.1.0", ], "triplet": [ "arm64-linux-gnu", "amd64-linux-gnu", "arm64-linux-musl", "amd64-linux-musl", "amd64-windows-msvc", "arm64-macos-darwin", "amd64-macos-darwin", ], }, uploads = [ "https://gitlab.arm.com/api/v4/projects/bazel%2Fdownload_utils/packages/generic/coreutils/{version}/{rust.archive.basename}", ], urls = [ "https://gitlab.arm.com/api/v4/projects/bazel%2Fdownload_utils/packages/generic/coreutils/{version}/{rust.archive.basename}", "https://github.com/uutils/coreutils/releases/download/{version}/coreutils-{version}-{rust.archive.basename}", ], ) ``` Run `bazel mod tidy --lockfile_mode=update` to generate the lock file. Run `bazel run @download_utils//download/triplet/lock:upload coreutils/lock.json` to mirror the downloads and lock the integrities.
-
Matthew Clarkson authored
-
Bot authored
# [1.1.0](https://git.gitlab.arm.com/bazel/download_utils/compare/v1.0.1...v1.1.0) (2025-06-26) ### Bug Fixes * add `links` to `{srcs}` replacement ([7cdde03d](https://git.gitlab.arm.com/bazel/download_utils/commit/7cdde03d46f62f4d70076cb829477b02957ac834)) * append canonical arguments to `WORKSPACE` if it exists ([86b169d0](https://git.gitlab.arm.com/bazel/download_utils/commit/86b169d04841489f83c13a64a8b48dd24f0e3fad)) * **archive:** allow empty string for `extension` attribute ([e0fa71ae](https://git.gitlab.arm.com/bazel/download_utils/commit/e0fa71aec075840a59fa179ccc615d125db11049)) * do not write `WORKSPACE` if `metadata` attribute is set ([1dc4fb7f](https://git.gitlab.arm.com/bazel/download_utils/commit/1dc4fb7fc1b7b0e92cdfa4d9693e5df5b17ed4b6)) ### Features * add `download_template` extension ([32479b12](https://git.gitlab.arm.com/bazel/download_utils/commit/32479b12a3a18b97f5b58a1c1ab73fbe3f896a2c)) * add pre-commit hooks ([062cad43](https://git.gitlab.arm.com/bazel/download_utils/commit/062cad437b5d44190594a1365d46586627c8f714)) * allow custom metadata files ([ea05186e](https://git.gitlab.arm.com/bazel/download_utils/commit/ea05186e72848a1dca7348f035989cf40d7ab91c))
Showing
- .bazelrc 11 additions, 2 deletions.bazelrc
- .bazelversion 1 addition, 1 deletion.bazelversion
- .git-blame-ignore-revs 1 addition, 0 deletions.git-blame-ignore-revs
- .gitlab-ci.yml 5 additions, 3 deletions.gitlab-ci.yml
- BUILD.bazel 4 additions, 1 deletionBUILD.bazel
- CHANGELOG.md 15 additions, 0 deletionsCHANGELOG.md
- CONTRIBUTING.md 8 additions, 0 deletionsCONTRIBUTING.md
- MODULE.bazel 32 additions, 2 deletionsMODULE.bazel
- MODULE.bazel.lock 8533 additions, 25 deletionsMODULE.bazel.lock
- README.md 128 additions, 3 deletionsREADME.md
- download/archive/repository.bzl 7 additions, 4 deletionsdownload/archive/repository.bzl
- download/deb/repository.bzl 6 additions, 3 deletionsdownload/deb/repository.bzl
- download/file/repository.bzl 6 additions, 8 deletionsdownload/file/repository.bzl
- download/template/BUILD.bazel 0 additions, 0 deletionsdownload/template/BUILD.bazel
- download/template/archive.bzl 86 additions, 0 deletionsdownload/template/archive.bzl
- download/template/deb.bzl 78 additions, 0 deletionsdownload/template/deb.bzl
- download/template/defs.bzl 5 additions, 0 deletionsdownload/template/defs.bzl
- download/template/extension.bzl 106 additions, 0 deletionsdownload/template/extension.bzl
- download/template/file.bzl 78 additions, 0 deletionsdownload/template/file.bzl
- download/template/lock/BUILD.bazel 37 additions, 0 deletionsdownload/template/lock/BUILD.bazel
.git-blame-ignore-revs
0 → 100644
This diff is collapsed.
download/template/BUILD.bazel
0 → 100644
download/template/archive.bzl
0 → 100644
download/template/deb.bzl
0 → 100644
download/template/defs.bzl
0 → 100644
download/template/extension.bzl
0 → 100644
download/template/file.bzl
0 → 100644
download/template/lock/BUILD.bazel
0 → 100644