Skip to content

Commit

Permalink
Replace bin/check-diff with a one-liner
Browse files Browse the repository at this point in the history
This removes the indirection of the bash script so that it's immediately
clear from the github action definition file what is being checked.

It also checks for _any_ delta in the git repo, not just the `dist/`
directory. Any change should fail CI until it's either committed or
added to `.gitignore`.
  • Loading branch information
jeffwidman committed Nov 2, 2022
1 parent 7db64c3 commit cd41e39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check dist
name: Check for uncommitted changes

on:
pull_request:
Expand All @@ -8,7 +8,8 @@ on:
- 'releases/*'

jobs:
verify-build: # make sure the checked in dist/ folder matches the output of a rebuild
# This also ensures a rebuild matches the checked-in dist/ folder
verify-build:
runs-on: ubuntu-latest

steps:
Expand All @@ -31,5 +32,7 @@ jobs:
- name: Rebuild the dist/ directory
run: npm run build

- name: Compare the expected and actual dist/ directories
run: bin/check-diff
- name: Compare the expected vs actual files.
# Check everything, not just dist/ because anything not needing to be
# committed should be listed in .gitignore
run: test -z "$(git status --porcelain)"
11 changes: 0 additions & 11 deletions bin/check-diff

This file was deleted.

0 comments on commit cd41e39

Please sign in to comment.