Skip to content

Commit

Permalink
build: ignore example docs index check if no docs are generated
Browse files Browse the repository at this point in the history
  • Loading branch information
ahochsteger committed May 10, 2024
1 parent e3aaea4 commit c397ae1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/update-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ function validateExample() {
exit 1
fi
local categoryIndexFile="${EXAMPLE_DOCS_BASEDIR}/${category}/index.mdx"
if [[ ! -f "${categoryIndexFile}" ]]; then
local generate; generate=$(getInfo "${EXAMPLE_SRC_BASEDIR}/${f}" "if (.generate|index(\"docs\")) then \"true\" else \"false\" end")
if [[ "${generate}" == "true" ]] && [[ ! -f "${categoryIndexFile}" ]]; then
echo -e "\nERROR: The category of the example file '${file}' misses an index file at '${categoryIndexFile}'!"
exit 1
fi
Expand Down

0 comments on commit c397ae1

Please sign in to comment.