Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,10 @@ def should_rebuild(self):
return False

def load_state(self) -> dict:
state_file = self.build_root / "state.toml"
if self.select_output is None:
state_file = self.build_root / "state.toml"
else:
state_file = self.build_root / f"state-{self.select_output}.toml"
try:
return tomlkit.loads(state_file.read_text(encoding="UTF-8"))[
f"/{self.language.tag}/{self.version.name}/"
Expand All @@ -942,7 +945,10 @@ def save_state(self, build_start: dt, build_duration: float, trigger: str):

Using this we can deduce if a rebuild is needed or not.
"""
state_file = self.build_root / "state.toml"
if self.select_output is None:
state_file = self.build_root / "state.toml"
else:
state_file = self.build_root / f"state-{self.select_output}.toml"
try:
states = tomlkit.parse(state_file.read_text(encoding="UTF-8"))
except FileNotFoundError:
Expand Down