Merge pull request #15191 from Luap99/docs-2

fix sphinx build to include podman-create/run page
This commit is contained in:
openshift-ci[bot]
2022-08-04 11:56:07 +00:00
committed by GitHub
2 changed files with 17 additions and 1 deletions

View File

@ -15,6 +15,19 @@
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
import re import re
import os
import subprocess
# We have to run the preprocessor to create the actual markdown files from .in files.
# Do it here so the it can work on readthedocs as well.
path = os.path.join(os.path.abspath(os.path.dirname(
__file__)), "../../hack/markdown-preprocess")
p = subprocess.Popen(path,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if p.returncode != 0:
raise Exception("failed to run markdown-preprocess", out, err)
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------

View File

@ -8,8 +8,11 @@ import os
import sys import sys
def main(): def main():
script_dir = os.path.abspath(os.path.dirname(__file__))
man_dir = os.path.join(script_dir,"../docs/source/markdown")
try: try:
os.chdir("docs/source/markdown") os.chdir(man_dir)
except FileNotFoundError: except FileNotFoundError:
raise Exception("Please invoke me from the base repo dir") raise Exception("Please invoke me from the base repo dir")