improve node sass workflow (#5347)

This commit is contained in:
Daniel
2023-09-21 20:11:19 +05:30
committed by GitHub
parent 03b992d385
commit 2f64c3da87

View File

@@ -43,10 +43,12 @@ jobs:
- name: Check built CSS files
shell: bash
run: |
if [[ $(find dist-sass/css/ -name "*.css" | xargs grep -F "\$" | wc -l | bc) -eq 0 ]]; then
echo "All good, no Sass variables found"
SASS_VARS_FOUND=$(find "dist-sass/css/" -type f -name "*.css" -print0 | xargs -0 --no-run-if-empty grep -F "\$" || true)
if [[ -z "$SASS_VARS_FOUND" ]]; then
echo "All good, no Sass variables found!"
exit 0
else
echo "Found Sass variables!"
echo "Found $(echo "$SASS_VARS_FOUND" | wc -l | bc) Sass variables:"
echo "$SASS_VARS_FOUND"
exit 1
fi