Skip to content

Commit bf3cc0f

Browse files
authored
Check for missing dependencies before building the website (#1678)
- Add an executable permission to the file. - Check for dependencies before the build starts. - Output a list of missing dependencies.
1 parent aea5bed commit bf3cc0f

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

website/build_website.sh

100644100755
+22-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
1+
#!/bin/bash
12
#
23
# This script generates documentation using pydoc-markdown and renders the website using Quarto.
34
#
4-
# Usage: bash build_website.sh
5+
6+
missing_deps=false
7+
58
#
9+
# Check for missing dependencies, report them, and exit when building the
10+
# website is likely to fail.
11+
#
12+
for dependency in node pydoc-markdown quarto python yarn npm
13+
do
14+
if ! command -v "$dependency" &> /dev/null
15+
then
16+
echo "Command '$dependency' not found."
17+
missing_deps=true
18+
fi
19+
done
20+
21+
if [ "$missing_deps" = true ]
22+
then
23+
echo -e "\nSome of the dependencies are missing."
24+
echo "Please install them to build the website."
25+
exit 1
26+
fi
627

728
# Generate documentation using pydoc-markdown
829
pydoc-markdown

0 commit comments

Comments
 (0)