|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -# Script to build Doxygen documentation and copy to Docusaurus static directory |
4 | | - |
5 | 3 | set -e |
6 | 4 |
|
7 | 5 | echo "Building Doxygen documentation..." |
8 | | - |
9 | | -# Navigate to the C++ root directory so paths in Doxyfile are correct |
10 | 6 | cd "$(dirname "$0")/../../cpp" |
11 | | - |
12 | | -# Build the documentation using Doxygen from the docs subdirectory |
13 | | -doxygen docs/Doxyfile |
| 7 | +doxygen -q docs/Doxyfile |
14 | 8 |
|
15 | 9 | echo "Copying Doxygen HTML to Docusaurus static directory..." |
16 | 10 |
|
17 | | -# Create the static/api directory if it doesn't exist |
18 | | -mkdir -p "../docs/static/api" |
19 | | - |
20 | | -# Copy the built documentation from the correct path |
21 | | -if [ -d "docs/build" ]; then |
22 | | - # First, clean the destination to avoid any leftover files |
23 | | - rm -rf ../docs/static/api/* |
24 | | - |
25 | | - # Copy the built documentation |
26 | | - cp -R docs/build/* ../docs/static/api/ |
27 | | - |
28 | | -else |
| 11 | +if ! [ -d "docs/build" ]; then |
29 | 12 | echo "Error: docs/build directory not found!" |
30 | 13 | exit 1 |
31 | 14 | fi |
| 15 | +# First, clean the destination to avoid any leftover files |
| 16 | +rm -rf ../docs/static/api/* |
| 17 | + |
| 18 | +# Copy the built documentation |
| 19 | +mkdir -p ../docs/static/api/ |
| 20 | +cp -R docs/build/* ../docs/static/api/ |
| 21 | + |
| 22 | +# NOTE(AD): hack - but was blocked and couldn't figure out why we had two examples for something called 'if' with different casing. |
| 23 | +rm ../docs/static/api/if-example.html |
32 | 24 |
|
33 | 25 | echo "Doxygen documentation successfully built and copied to Docusaurus!" |
34 | 26 | echo "You can now build and serve the Docusaurus site to view the integrated documentation." |
0 commit comments