From 8080425f3067f98f560d37462b6c68ec2695142d Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Thu, 3 Feb 2022 12:22:47 +0100 Subject: [PATCH] (actions) print the diff --- .github/workflows/npm.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 601de0f3..5ffceb81 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -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"