Skip to content

Commit

Permalink
Fix doc compilation (#182)
Browse files Browse the repository at this point in the history
* Fix compilation of docs

* Bump version
  • Loading branch information
MasloMaslane authored Feb 14, 2024
1 parent c1367e7 commit 09aaafc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sinol_make/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from sinol_make import util, oiejq


__version__ = "1.5.24"
__version__ = "1.5.25"


def configure_parsers():
Expand Down
10 changes: 9 additions & 1 deletion src/sinol_make/commands/doc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ def compile_file(self, file_path):
print(util.info(f'Compilation successful for file {os.path.basename(file_path)}.'))
return True

def make_file(self, file_path):
"""
Compile the file two times to get the references right.
"""
if not self.compile_file(file_path):
return False
return self.compile_file(file_path)

def move_logs(self):
output_dir = paths.get_cache_path('doc_logs')
os.makedirs(output_dir, exist_ok=True)
Expand Down Expand Up @@ -69,7 +77,7 @@ def run(self, args: argparse.Namespace):
original_cwd = os.getcwd()
failed = []
for file in self.files:
if not self.compile_file(file):
if not self.make_file(file):
failed.append(file)
os.chdir(original_cwd)

Expand Down

0 comments on commit 09aaafc

Please sign in to comment.