Skip to content

Commit

Permalink
(actions) check if build folder is up-to-date
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Feb 3, 2022
1 parent 727dd06 commit 1a38278
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ jobs:
- name: Test
run: |
npm test --prefix ${{ matrix.package }}
- name: Success
- name: Build is up-to-date
run: |
echo -e "\e[35m\e[1mThe build of '${{ matrix.package }}' has succeeded, please make sure that the 'build'/'dist' folder is up-to-date\e[0m"
echo -e "\e[1m\e[35mChecking the build folder(dist) is up-to-date with the library\e[0m"
changed_build_files=$(git -C "$(git rev-parse --show-toplevel)" diff --name-only HEAD -- ${{ matrix.package }}/dist)
if [ -n "$changed_build_files" ]
then
echo -e "\e[1m\e[31mBuild folder is out-of-sync with library. Build library, npm run build, and (ammend) commit\e[0m"
exit 1
else
echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m"
fi

0 comments on commit 1a38278

Please sign in to comment.