Skip to content

Commit

Permalink
(actions) print the diff
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Feb 3, 2022
1 parent 3154782 commit 8080425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ jobs:
- name: Build is up-to-date
run: |
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)
changed_build_files=$(git 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"
echo -e "\e[1m\e[31mChanged files: $changed_build_files"
git diff HEAD -- ${{ matrix.package }}/dist
exit 1
else
echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m"
Expand Down

0 comments on commit 8080425

Please sign in to comment.