fix(ci): use find to copy all Ent generated files

This commit is contained in:
2025-11-07 08:39:26 +01:00
parent 868649d6d2
commit 837b04b433

View File

@@ -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