Show the rules a stale stylesheet differs in (closes #231)
check / check (push) Successful in 3m27s

The css-check stage splits both stylesheets after each "}" and prints
their diff, so a failure names the rules that differ instead of a
character position.

The check workflow's fingerprint comment and build step name now
include the stylesheet check, as the README does. The README's
Stylesheet section names internal/handlers/recent_events.go among the
files to edit.

Model: opus-5-5
This commit is contained in:
2026-10-02 21:52:32 +00:00
parent cb28892f89
commit eed24ff29c
3 changed files with 16 additions and 12 deletions
+5 -1
View File
@@ -55,8 +55,12 @@ RUN tailwindcss -i static/css/input.css -o /out/tailwind.css --minify
FROM scratch AS css-output
COPY --from=css /out/tailwind.css /
# Both files are split after each "}", one rule per line, so that when they
# differ the diff shows the rules that differ.
FROM css AS css-check
RUN cmp /out/tailwind.css static/css/tailwind.css || { \
RUN sed 's/}/}\n/g' static/css/tailwind.css > /tmp/committed.css \
&& sed 's/}/}\n/g' /out/tailwind.css > /tmp/generated.css \
&& diff -U0 /tmp/committed.css /tmp/generated.css || { \
echo "static/css/tailwind.css is not what make css generates; run make css" >&2; \
exit 1; \
}