From 1fe187416eaaba1fc6e1bf89157dfa41624a75e3 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Thu, 3 Feb 2022 18:13:41 +0100 Subject: [PATCH] (actions) also print new files --- .github/workflows/npm.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 5ffceb81..bbd57926 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -47,8 +47,11 @@ jobs: 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" + echo -e "\e[1m\e[31mChanged files: $changed_build_files\e[0m" + echo -e "\e[1m\e[31mDiff of current files:\e[0m" git diff HEAD -- ${{ matrix.package }}/dist + echo -e "\e[1m\e[31mNew files:\e[0m" + git ls-files -o --exclude-standard -- ${{ matrix.package }}/dist/* | xargs git add; git diff --staged -- ${{ matrix.package }}/dist exit 1 else echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m"