From 80059b67e6e3b31c7ab92650c68e3f522f885855 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sun, 7 Jun 2026 05:17:59 +0200 Subject: [PATCH] fix(ci): replace diff --include with find-based comparison for generated files The GNU diff in the CI container doesn't support --include flag; switch to a find | while-read loop that diffs each matched file individually. Co-Authored-By: Claude Sonnet 4.6 --- ci/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/main.go b/ci/main.go index 67f6e9c..b3c07df 100644 --- a/ci/main.go +++ b/ci/main.go @@ -511,10 +511,11 @@ func (m *Ci) CheckGenerated(ctx context.Context) (string, error) { WithDirectory("/committed", m.checkSrc(), dagger.ContainerWithDirectoryOpts{Owner: "ci"}). WithDirectory("/generated", fresh, dagger.ContainerWithDirectoryOpts{Owner: "ci"}). WithExec([]string{"/bin/bash", "-c", - `if diff -rq --include='*.g.dart' --include='*.mocks.dart' /committed /generated; then ` + - `echo "Generated files are up to date."; ` + - `else echo "ERROR: Generated files are out of date — run: dart run build_runner build"; exit 1; ` + - `fi`}). + `stale=$(find /committed -name '*.g.dart' -o -name '*.mocks.dart' | ` + + `while IFS= read -r f; do rel="${f#/committed/}"; diff -q "$f" "/generated/$rel" >/dev/null 2>&1 || echo "$rel"; done); ` + + `if [ -n "$stale" ]; then ` + + `echo "ERROR: Generated files are out of date — run: dart run build_runner build"; echo "$stale"; exit 1; ` + + `else echo "Generated files are up to date."; fi`}). Stdout(ctx) }