Skip to content

Commit

Permalink
Remove docs/apidocs/ directory if it already exists to ensure we always
Browse files Browse the repository at this point in the history
start with a clean environment when building apidocs.
  • Loading branch information
Kami committed Aug 8, 2023
1 parent cb185f4 commit d7f0a8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import re
import sys
import glob
import shutil
import datetime

from sphinx.ext import apidoc
Expand Down Expand Up @@ -338,6 +339,10 @@ def run_apidoc(_):
# Problematic driver with hundreds of issues
ignore_paths += ["../libcloud/compute/drivers/outscale.py"]

# Remove existing api docs directory if it exists so we start with a clean environment
apidocs_dir = os.path.abspath(os.path.join(BASE_DIR, "apidocs/"))
shutil.rmtree(apidocs_dir, ignore_errors=True)

argv = [
"--force", # Overwrite output files
"--follow-links", # Follow symbolic links
Expand Down

0 comments on commit d7f0a8b

Please sign in to comment.