Skip to content

Commit 09aaafc

Browse files
authored
Fix doc compilation (#182)
* Fix compilation of docs * Bump version
1 parent c1367e7 commit 09aaafc

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/sinol_make/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from sinol_make import util, oiejq
1010

1111

12-
__version__ = "1.5.24"
12+
__version__ = "1.5.25"
1313

1414

1515
def configure_parsers():

src/sinol_make/commands/doc/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ def compile_file(self, file_path):
3434
print(util.info(f'Compilation successful for file {os.path.basename(file_path)}.'))
3535
return True
3636

37+
def make_file(self, file_path):
38+
"""
39+
Compile the file two times to get the references right.
40+
"""
41+
if not self.compile_file(file_path):
42+
return False
43+
return self.compile_file(file_path)
44+
3745
def move_logs(self):
3846
output_dir = paths.get_cache_path('doc_logs')
3947
os.makedirs(output_dir, exist_ok=True)
@@ -69,7 +77,7 @@ def run(self, args: argparse.Namespace):
6977
original_cwd = os.getcwd()
7078
failed = []
7179
for file in self.files:
72-
if not self.compile_file(file):
80+
if not self.make_file(file):
7381
failed.append(file)
7482
os.chdir(original_cwd)
7583

0 commit comments

Comments
 (0)