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.
parent 3f67a810
......@@ -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
......@@ -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 '/<link rel=\"stylesheet\"/d' ./src/dir-index.html > ./base-html.html",
"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",
"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",
"build:combine-html-css": "sed '/<head>/ r ./minified-wrapped-style.html' ./base-html.html > ./dir-index.html",
"build:remove-unused": "rm ./base-html.html && rm ./minified-wrapped-style.html"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment