Skip to content

Commit

Permalink
Make doc rebuild run unprivileged, remove redundant build, add verbose
Browse files Browse the repository at this point in the history
Co-authored with @lunkwill42
  • Loading branch information
podliashanyk committed Mar 8, 2024
1 parent ffa18e2 commit 59185f3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/docker/doc-watch.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash -e
#!/bin/bash -ex
# Rebuilds Sphinx documentation on changes
#
cd /source
# Build once first
sudo -u nav python3 -m build # ensure build data and .eggs aren't stored as root
pip install -e .
sudo -u nav sphinx-build doc/ build/sphinx/html/
pip install -vv -e .
sphinx-build doc/ build/sphinx/html/
# Then re-build on any changes to the doc directory
while inotifywait -e modify -e move -e create -e delete -r --exclude \# /source/doc /source/NOTES.rst
do
sudo -u nav sphinx-build doc/ build/sphinx/html/
sphinx-build doc/ build/sphinx/html/
done

0 comments on commit 59185f3

Please sign in to comment.