Skip to content

Commit

Permalink
Humanise the diff check failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry Gordon committed Feb 10, 2022
1 parent 7db94e5 commit aade2a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check dist/
name: Check dist

on:
pull_request:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
run: npm run package

- name: Compare the expected and actual dist/ directories
run: git diff --quiet dist/
run: script/check-diff
verify-index-js: # make sure the entrypoint js files run on a clean machine without compiling first
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 9 additions & 0 deletions script/check-diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

git diff --quiet dist/
retVal=$?
if [ $retVal -ne 0 ]; then
echo "Detected uncommitted changes after build:"
git --no-pager diff dist/
exit 1
fi

0 comments on commit aade2a8

Please sign in to comment.