Skip to content

Commit 6bbe742

Browse files
authored
Use existing check-dist implementation (#618)
1 parent c9db520 commit 6bbe742

2 files changed

Lines changed: 8 additions & 17 deletions

File tree

.github/workflows/check-dist.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@ jobs:
3232
- name: Install dependencies
3333
run: npm ci
3434

35-
- name: Move the committed index.js file
36-
run: mv dist/ /tmp/
37-
38-
- name: Rebuild the index.js file
35+
- name: Rebuild the dist/ directory
3936
run: npm run build
4037

41-
- name: Compare the expected and actual index.js files
42-
run: git diff --ignore-all-space dist/ /tmp/dist
38+
- name: Compare the expected and actual dist/ directories
39+
run: |
40+
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
41+
echo "Detected uncommitted changes after build. See status below:"
42+
git diff
43+
exit 1
44+
fi
4345
id: diff
4446

4547
# If index.js was different than expected, upload the expected version as an artifact

.github/workflows/workflow.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,6 @@ jobs:
4747
run: npm run lint
4848
- name: Build & Test
4949
run: npm run test
50-
- name: Ensure dist/ folder is up-to-date
51-
if: ${{ runner.os == 'Linux' }}
52-
shell: bash
53-
run: |
54-
npm run build
55-
if [ "$(git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
56-
echo "Detected uncommitted changes after build. See status below:"
57-
git diff
58-
exit 1
59-
fi
60-
6150

6251
# End to end save and restore
6352
test-save:

0 commit comments

Comments
 (0)