shiori/scripts/styles_check.sh
Monirzadeh c6aabc49f1
fix: styles-check and swag-check monitor just needed directory not project root (#747)
* styles-check just work on less and css directory

* just cheack css directory

* make swag-check just monitor generated files
2023-10-09 18:02:05 +02:00

17 lines
600 B
Bash
Executable file

#!/bin/bash
# This script is used to check if the style.css file is up to date.
# Check if the git tree for CWD is clean
if [ -n "$(git status internal/view/assets/css --porcelain)" ]; then
echo "❌ git tree is not clean. Please commit all changes before running this script."
exit 1
fi
# Check style.css file
CLEANCSS_OPTS=${CLEANCSS_OPTS} make styles
if [ -n "$(git status internal/view/assets/css --porcelain)" ]; then
echo "❌ style.css wasn't built from less changes. Please run 'make styles' and commit the changes."
git checkout -- internal/view/assets/css/
exit 1
fi