shiori/scripts/styles_check.sh
Felipe Martin 4df7e1dd8e
feat: build css from less files locally (#735)
* build less using lessc and bun

* build

* make styles-check

* Added workflow to check updates

* avoid embed less files

* docs

* updated tests to reflect changes

* typo

* fixed archive page css

* call styles check on pull requests

* comments in style.less

* fix archive styles affecting other pages

* minify using clean-css

* Split archive.css and style.css

* Updated docs
2023-09-16 19:58:55 +02:00

17 lines
525 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 --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 --porcelain)" ]; then
echo "❌ style.css wasn't built from less changes. Please run 'make styles' and commit the changes."
git reset --hard
exit 1
fi