diff --git a/build/build/build.py b/build/build/build.py index 01640f2..40ed33a 100644 --- a/build/build/build.py +++ b/build/build/build.py @@ -38,7 +38,7 @@ class TexFileToFormat: self.overwrite_existing_files: overwrite_existing_files self.build_all = build_all - self.dirty = is_recent(self.src_path, self.current_build_info.package_repo, compare=None) + self.dirty = not is_recent(self.src_path, self.current_build_info.package_repo, compare=None) self.pytex_dirty: bool = self.current_build_info.pytex_repo.is_dirty( working_tree=True, untracked_files=True @@ -70,7 +70,7 @@ class TexFileToFormat: elif not self.pytex_recent or not self.recent: return self.__format() # Build file since either pytex or package repo is not recent else: - pass # Do not build + return self.last_build_info def __format(self) -> dict: if '.pysty' in self.src_path.name: diff --git a/build/git_hook/recent.py b/build/git_hook/recent.py index 6e161db..d824bdb 100644 --- a/build/git_hook/recent.py +++ b/build/git_hook/recent.py @@ -37,6 +37,6 @@ def is_recent(file: Path, repo: git.Repo, compare: Optional[Union[git.Commit, Li return None if str(file.relative_to(repo.working_dir)) in newly_committed_files: - return True - else: return False + else: + return True