Skip to content

Commit

Permalink
Merge pull request #1063 from googlefonts/qa-run
Browse files Browse the repository at this point in the history
qa: carry on runnning all tools if an error occurs
  • Loading branch information
m4rc1e authored Nov 14, 2024
2 parents 48f7b83 + 36dcde3 commit 96b8c5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/gftools/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self, fonts, fonts_before=None, out="out", url=None):
self.fonts_before = fonts_before
self.out = out
self.url = url
self.has_error = False

@report_exceptions
def diffenator(self, **kwargs):
Expand Down Expand Up @@ -134,8 +135,7 @@ def fontbakery(self, profile="googlefonts", html=False, extra_args=None):
self.post_to_github(msg)

if process.returncode != 0:
logger.fatal("Fontbakery has raised a fatal error. Please fix!")
sys.exit(1)
self.has_error = True

def googlefonts_upgrade(self, imgs=False):
self.fontbakery()
Expand Down
5 changes: 5 additions & 0 deletions Lib/gftools/scripts/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from fontTools.ttLib import TTFont
import argparse
import os
import sys
import shutil
import logging
from gftools.utils import (
Expand Down Expand Up @@ -268,6 +269,10 @@ def main(args=None):
if args.interpolations:
qa.interpolations()

if qa.has_error:
logger.fatal("Fontbakery has raised a fatal error. Please fix!")
sys.exit(1)


if __name__ == "__main__":
main()

0 comments on commit 96b8c5e

Please sign in to comment.