File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- set -e
3
+ set -euo pipefail
4
+
5
+ edr_pkgs=($(
6
+ cargo metadata --format-version 1 --no-deps \
7
+ | jq -r ' .packages[].name | select(startswith("edr_"))'
8
+ ) )
9
+
10
+ foundry_pkgs=($(
11
+ cargo metadata --format-version 1 --no-deps \
12
+ | jq -r --arg path " $PWD /crates/foundry/" \
13
+ ' .packages[] | select(.manifest_path | startswith($path)) | .id'
14
+ ) )
4
15
5
16
# For EDR crates, test that docs build and they don't have warnings
6
- for dir in crates/edr_* / ; do
7
- if [ -d " $dir " ]; then
8
- pushd " $dir " > /dev/null
9
- RUSTDOCFLAGS=" -D warnings" cargo doc --no-deps --all-features
10
- popd > /dev/null
11
- fi
12
- done
17
+ RUSTDOCFLAGS=" -D warnings" cargo doc --no-deps --all-features " ${edr_pkgs[@]/#/ --package=} "
13
18
14
19
# For Foundry crates, only test that docs build and allow linking to private items
15
- for dir in crates/foundry/* ; do
16
- if [ -d " $dir " ]; then
17
- pushd " $dir " > /dev/null
18
- cargo doc --all-features --no-deps --document-private-items
19
- popd > /dev/null
20
- fi
21
- done
22
-
20
+ RUSTDOCFLAGS=" -A warnings" cargo doc --no-deps --all-features --document-private-items " ${foundry_pkgs[@]/#/ --package=} "
You can’t perform that action at this time.
0 commit comments