Skip to content

Commit 4a906fe

Browse files
committed
Fix generate-api-docs
1 parent efa22b4 commit 4a906fe

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

doc/generate-api-docs.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ LIBS_SORTED=$(
5050
)
5151

5252
for LIB in $LIBS_SORTED; do
53+
echo ${LIB}
5354
LIB_DIR=$(find . -maxdepth 2 -name ${LIB} -type d)
54-
cd ${LIB_DIR}
55-
ARGS=""
56-
if FEATURES="$(cargo read-manifest|jq -r '.metadata.docs.rs.features | join(",")' 2> /dev/null)"; then
57-
ARGS="--features $FEATURES"
55+
if [[ -d "${LIB_DIR}" ]]; then
56+
pushd ${LIB_DIR}
57+
ARGS=""
58+
if FEATURES="$(cargo read-manifest|jq -r '.metadata.docs.rs.features | join(",")' 2> /dev/null)"; then
59+
ARGS="--features $FEATURES"
60+
fi
61+
cargo doc --no-deps --lib $ARGS
62+
popd
5863
fi
59-
cargo doc --no-deps --lib $ARGS
60-
cd -
6164
done

0 commit comments

Comments
 (0)