@cryptotaxi247 / kubo / commits / b12c35a22

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.

Marcin Rataj committed Sep 26, 2020 at 03:14 UTC b12c35a229dbb9ecb4aa6cb9459951972155221c
2 files changed +3 -3
.github/workflows/build.yml
+2 -2
@@ -12,10 +12,10 @@ jobs:
12 uses: actions/setup-node@v1
13 with:
14 node-version: '12.x'
15 - - run: npm run build
15 + - run: npm run build
16 - name: Check working tree
17 id: changes
18 uses: UnicornGlobal/has-changes-action@v1.0.11
19 - name: Check for uncommited changes
20 if: steps.changes.outputs.changed == 1
21 - run: git status && echo "Output does not match src/, uncommitted changes exist, follow build instructions from README" && exit 1
21 + 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
package.json
+1 -1
@@ -21,7 +21,7 @@
21 "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",
22 "build:clean": "rm dir-index.html",
23 "build:remove-style-links": "sed '/<link rel=\"stylesheet\"/d' ./src/dir-index.html > ./base-html.html",
24 - "build:minify-wrap-css": "(echo \"<style>\" && cat ./src/icons.css ./src/style.css | tr -d \"\t\n\r\" && echo -e \"\\n</style>\") > ./minified-wrapped-style.html",
24 + "build:minify-wrap-css": "(echo \"<style>\" && cat ./src/icons.css ./src/style.css | tr -d \"\t\n\r\" && echo && echo \"</style>\") > ./minified-wrapped-style.html",
25 "build:combine-html-css": "sed '/<head>/ r ./minified-wrapped-style.html' ./base-html.html > ./dir-index.html",
26 "build:remove-unused": "rm ./base-html.html && rm ./minified-wrapped-style.html"
27 }