From b12c35a229dbb9ecb4aa6cb9459951972155221c Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Sat, 26 Sep 2020 03:14:10 +0200 Subject: [PATCH] fix(ci): avoid uncommited changes with custom shells for some reason `-e` gets interpreted literally at CI. This removes its use making the output look the same everywhere. CI will now show diff if uncommited changes to make it easier to see what caused CI to fail. --- .github/workflows/build.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f852196..100a5af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,10 @@ jobs: uses: actions/setup-node@v1 with: node-version: '12.x' - - run: npm run build + - run: npm run build - name: Check working tree id: changes uses: UnicornGlobal/has-changes-action@v1.0.11 - name: Check for uncommited changes if: steps.changes.outputs.changed == 1 - run: git status && echo "Output does not match src/, uncommitted changes exist, follow build instructions from README" && exit 1 + run: git status && git --no-pager diff --patch-with-raw && echo "Output does not match src/, uncommitted changes exist, follow build instructions from README" && exit 1 diff --git a/package.json b/package.json index 858f5d0..8769b4b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "build": "npm run build:clean && npm run build:remove-style-links && npm run build:minify-wrap-css && npm run build:combine-html-css && npm run build:remove-unused", "build:clean": "rm dir-index.html", "build:remove-style-links": "sed '/ ./base-html.html", - "build:minify-wrap-css": "(echo \"\") > ./minified-wrapped-style.html", + "build:minify-wrap-css": "(echo \"\") > ./minified-wrapped-style.html", "build:combine-html-css": "sed '// r ./minified-wrapped-style.html' ./base-html.html > ./dir-index.html", "build:remove-unused": "rm ./base-html.html && rm ./minified-wrapped-style.html" } -- GitLab