From 818569f2c893e99ef1eb3acf5a17521cb9843f9b Mon Sep 17 00:00:00 2001 From: Minecraftschurli Date: Tue, 5 Sep 2023 16:39:24 +0200 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97015de..65a6e86 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,9 +89,13 @@ jobs: if: ${{ inputs.check-datagen }} id: check-data run: | - if [ "$(git diff --ignore-space-at-eol --text ${{ inputs.datagen-folder }} | wc -l)" -gt "0" ]; then + changes_diff=$(git diff --ignore-space-at-eol --text ${{ inputs.datagen-folder }} | wc -l) + changes_status=$(git status --porcelain ${{ inputs.datagen-folder }} | wc -l) + changes=$(( $changes_diff + $changes_status )) + if [ "$changes" -gt "0" ]; then echo "Detected uncommitted changes after build. See status below:" git diff --ignore-space-at-eol --text ${{ inputs.datagen-folder }} + git status ${{ inputs.datagen-folder }} exit 1 fi