mirror of https://github.com/bazelbuild/rules_rust
Update crates_universe render script to run from Bazel (#2492)
This commit is contained in:
parent
184da7d4ec
commit
b1fc85232d
|
@ -38,5 +38,5 @@ A lot of crates are vendored into this repo, e.g. in examples and tests. To
|
|||
re-vendor them all, a bash script is provided:
|
||||
|
||||
```sh
|
||||
./util/vendor.sh
|
||||
bazel run //crate_universe/tools:vendor
|
||||
```
|
||||
|
|
|
@ -5,3 +5,8 @@ filegroup(
|
|||
],
|
||||
visibility = ["//crate_universe:__subpackages__"],
|
||||
)
|
||||
|
||||
sh_binary(
|
||||
name = "vendor",
|
||||
srcs = ["vendor.sh"],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# A script to re-vendor all vendors crates in this repository.
|
||||
# This should be ran whenever any crate rendering changes.
|
||||
|
||||
|
@ -15,7 +17,11 @@ vendor_workspace() {
|
|||
popd >/dev/null
|
||||
}
|
||||
|
||||
workspaces="$(find -type f -name WORKSPACE.bazel -o -name WORKSPACE -o -name MODULE.bazel)"
|
||||
if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then
|
||||
cd "${BUILD_WORKSPACE_DIRECTORY:-}"
|
||||
fi
|
||||
|
||||
workspaces="$(find . -type f -name WORKSPACE.bazel -o -name MODULE.bazel)"
|
||||
|
||||
for workspace in $workspaces
|
||||
do
|
Loading…
Reference in New Issue