fix(ci): fail UI CI when the committed dist differs from a clean build

This commit is contained in:
Julian Sommer
2026-10-15 11:21:35 +10:00
parent 236dd2e87d
commit 600fb41012
+10 -1
View File
@@ -58,5 +58,14 @@ jobs:
- name: Build Frontend
run: pnpm build
# spx embeds the committed dist/, so a bundle that differs from a clean
# build of this source would ship JavaScript CI never built. Porcelain
# rather than git diff, so added and deleted chunks count too.
- name: Check for generated file drift
run: git diff --exit-code -- src/routeTree.gen.ts src/lib/cn-tables.gen.ts
run: |
drift=$(git status --porcelain -- src/routeTree.gen.ts src/lib/cn-tables.gen.ts dist)
if [ -n "$drift" ]; then
echo "::error::Generated files differ from a clean build. Run pnpm build and commit the result."
echo "$drift"
exit 1
fi