diff --git a/.hooks/kicad_cli_tools.py b/.hooks/kicad_cli_tools.py index e9840a7..df6a478 100644 --- a/.hooks/kicad_cli_tools.py +++ b/.hooks/kicad_cli_tools.py @@ -203,15 +203,13 @@ def commit_files(files: list[Path], commit_message : str) -> None: ret_commit = subprocess.call(f"git commit -m \"{commit_message}\"", shell=True) def main() -> None: - # find all kicad project files to operate on - for path in Path(".").rglob('*.kicad_pro'): - k = KicadProject(Path("hardware/poe-lights/poe-lights.kicad_pro")) - k.drc_check(report_format = OutputReportType.REPORT) - k.erc_check(report_format = OutputReportType.REPORT) - k.process_bom() - k.create_schmatic_pdf() - k.get_image() - commit_files(k.created_files, "auto commited") + k = KicadProject(Path("hardware/poe-lights/poe-lights.kicad_pro")) + k.drc_check(report_format = OutputReportType.REPORT) + k.erc_check(report_format = OutputReportType.REPORT) + k.process_bom() + k.create_schmatic_pdf() + k.get_image() + commit_files(k.created_files, "auto commited") if __name__ == "__main__": try: