From f0c32260fa149978d690a27a6422b391241ac493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 22 Oct 2021 13:51:31 +0200 Subject: [PATCH] fix some bugs --- build/build/build.py | 4 ++-- build/git_hook/recent.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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