Skip to content

Commit

Permalink
Check for missing dependencies before building the website (microsoft…
Browse files Browse the repository at this point in the history
…#1678)

- Add an executable permission to the file.
 - Check for dependencies before the build starts.
 - Output a list of missing dependencies.
  • Loading branch information
gunnarku authored Feb 16, 2024
1 parent 65205cb commit aa806d6
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion website/build_website.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
#!/bin/bash
#
# This script generates documentation using pydoc-markdown and renders the website using Quarto.
#
# Usage: bash build_website.sh

missing_deps=false

#
# Check for missing dependencies, report them, and exit when building the
# website is likely to fail.
#
for dependency in node pydoc-markdown quarto python yarn npm
do
if ! command -v "$dependency" &> /dev/null
then
echo "Command '$dependency' not found."
missing_deps=true
fi
done

if [ "$missing_deps" = true ]
then
echo -e "\nSome of the dependencies are missing."
echo "Please install them to build the website."
exit 1
fi

# Generate documentation using pydoc-markdown
pydoc-markdown
Expand Down

0 comments on commit aa806d6

Please sign in to comment.