From 974821b78f97895263ab754fa3ea9e883001661d Mon Sep 17 00:00:00 2001 From: 0x1d Date: Fri, 7 Nov 2025 08:39:26 +0100 Subject: [PATCH] Fix CI: Use find to copy all Ent generated files The cp -r *.go */ command was failing because glob patterns don't work reliably in shell scripts. Use find to copy all .go files recursively while preserving directory structure. --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89c5084..aa61ede 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,8 +50,9 @@ jobs: cd ent && go run -mod=mod entgo.io/ent/cmd/ent generate ./schema echo "Copying Ent code to internal/ent..." mkdir -p ../internal/ent - cp -r *.go */ ../internal/ent/ 2>/dev/null || true + find . -name "*.go" -type f -exec cp --parents {} ../internal/ent/ \; rm -f ../internal/ent/generate.go + rm -rf ../internal/ent/schema echo "Verifying internal/ent/ent.go exists..." ls -la ../internal/ent/ent.go || echo "ERROR: ent.go not found!" else @@ -121,8 +122,9 @@ jobs: cd ent && go run -mod=mod entgo.io/ent/cmd/ent generate ./schema echo "Copying Ent code to internal/ent..." mkdir -p ../internal/ent - cp -r *.go */ ../internal/ent/ 2>/dev/null || true + find . -name "*.go" -type f -exec cp --parents {} ../internal/ent/ \; rm -f ../internal/ent/generate.go + rm -rf ../internal/ent/schema echo "Verifying internal/ent/ent.go exists..." ls -la ../internal/ent/ent.go || echo "ERROR: ent.go not found!" else @@ -177,8 +179,9 @@ jobs: cd ent && go run -mod=mod entgo.io/ent/cmd/ent generate ./schema echo "Copying Ent code to internal/ent..." mkdir -p ../internal/ent - cp -r *.go */ ../internal/ent/ 2>/dev/null || true + find . -name "*.go" -type f -exec cp --parents {} ../internal/ent/ \; rm -f ../internal/ent/generate.go + rm -rf ../internal/ent/schema echo "Verifying internal/ent/ent.go exists..." ls -la ../internal/ent/ent.go || echo "ERROR: ent.go not found!" else