Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

qa: return errcode 1 if fontbakery reports a fatal error #800

Merged
merged 2 commits into from
Jan 3, 2024
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
Next Next commit
qa: return exit code 1 if fontbakery reports a fatal error
  • Loading branch information
m4rc1e committed Dec 14, 2023
commit f09d25090bcaaf7da8f98da9ed69b0acecef3aae
7 changes: 6 additions & 1 deletion Lib/gftools/qa.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@

from gftools.gfgithub import GitHubClient
from gftools.utils import mkdir
import sys

try:
from diffenator2 import ninja_diff, ninja_proof
@@ -114,12 +115,16 @@ def fontbakery(self, profile="googlefonts", html=False, extra_args=None):
+ [f.path for f in self.fonts]
+ ["-C"]
+ ["--ghmarkdown", os.path.join(out, "report.md")]
+ ["-e", "FATAL"]
)
if html:
cmd.extend(["--html", os.path.join(out, "report.html")])
if extra_args:
cmd.extend(extra_args)
subprocess.call(cmd)
process = subprocess.run(cmd)
if process.returncode != 0:
logger.fatal("Fontbakery has raised a fatal error. Please fix!")
sys.exit(1)

fontbakery_report = os.path.join(self.out, "Fontbakery", "report.md")
if not os.path.isfile(fontbakery_report):