Skip to content

Commit 31f5677

Browse files
committed
update
1 parent 9eec84c commit 31f5677

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.jenkins/sphinx_files.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1+
import shutil
12
import subprocess
23
import os
3-
4+
import glob
45

56
def main() -> None:
67
files_to_run = os.environ["FILES_TO_RUN"]
78
env = os.environ.copy()
89
for file in files_to_run.split(" "):
910
print(f"Running {file}")
1011
env["RUNTHIS"] = file
11-
subprocess.check_output(["make", "html"], env=env)
12-
12+
subprocess.check_output(["make", "html", f"BUILDDIR=_build/{file}"], env=env)
13+
files = glob.glob(f"_build/{file}/**", recursive=True)
14+
for gen_file in files:
15+
if file in str(gen_file):
16+
rel_path = os.path.relpath(gen_file, f"_build/{file}")
17+
shutil.copy(gen_file, f"_build/{rel_path}")
1318

1419
if __name__ == "__main__":
1520
main()

0 commit comments

Comments
 (0)