Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 12 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,15 @@ jobs:
path: html/issue*.html
retention-days: 7
if-no-files-found: ignore

- name: Check source code changes
continue-on-error: true
run: |
git fetch --depth 2 origin master
if ! git diff --quiet origin/master HEAD -- src
then
if ! bin/check-html-diffs.sh origin/master always
then
echo "::warning title=html-diffs::Generated HTML files do not match"
fi
fi
18 changes: 18 additions & 0 deletions bin/check-html-diffs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
old=$(mktemp -d ./mailing.old.XXXXXX)
new=$(mktemp -d ./mailing.new.XXXXXX)
echo Building lists at HEAD
make clean
make lists -j4
sed -i 's/Revised ....-..-.. at ..:..:.. UTC/Revised .../' mailing/*.html
mv mailing $new
git checkout ${1-origin/master} -- src
echo Building lists with code from `git rev-parse origin/master`
make clean
make lists -j4
git checkout HEAD -- src
sed -i 's/Revised ....-..-.. at ..:..:.. UTC/Revised .../' mailing/*.html
mv mailing $old
diff -u -r --color=${2:-auto} $old $new || exit
rm -r $old $new
echo No changes to HTML files