run.sh 468 B

123456789101112
  1. # Only run gftools qa on prs which contain font files.
  2. PR_FILES=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/files
  3. HAS_FONTS=$(curl -H "Authorization: token $GH_TOKEN" $PR_FILES | jq '[.[] | .filename | test("ttf|otf")] | any')
  4. if [ "$HAS_FONTS" = true ];
  5. then
  6. echo "Running gftools qa"
  7. gftools qa -pr https://github.com/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST -gfb -a -o qa -ogh
  8. else
  9. echo "Skipping. No fonts in PR"
  10. fi