Use existing check-dist implementation (#618)

This commit is contained in:
Brian Cristante 2021-08-09 09:10:47 -04:00 committed by GitHub
parent c9db520cf3
commit 6bbe742add
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 17 deletions

View file

@ -32,14 +32,16 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Move the committed index.js file
run: mv dist/ /tmp/
- name: Rebuild the index.js file
- name: Rebuild the dist/ directory
run: npm run build
- name: Compare the expected and actual index.js files
run: git diff --ignore-all-space dist/ /tmp/dist
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff
# If index.js was different than expected, upload the expected version as an artifact