Skip to content

Commit

Permalink
checkrefs.yml: (fix) check for non-empty file
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Mar 7, 2023
1 parent e516d82 commit 9eae3ae
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/checkrefs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ jobs:
runs-on: bullseye
steps:
- uses: actions/checkout@v3
- run: |
- name: Run checkrefs.py
run: |
ERRLOG="${GITHUB_WORKSPACE}/errlog.txt"
cd /0ad/source/tools/entity
python3 ./checkrefs.py -m "${GITHUB_WORKSPACE}" -tax 2> $ERRLOG
cat $ERRLOG
grep -i error $ERRLOG && exit 1
grep -i warning $ERRLOG && exit 1
LOG_CONTENTS=$(cat $ERRLOG)
if [ -z "$LOG_CONTENTS" ]; then
exit 0
fi
echo $LOG_CONTENTS
exit 1

0 comments on commit 9eae3ae

Please sign in to comment.