Skip to content

Commit 89188e4

Browse files
authored
chore(api): update buildspec to handle multiple output structures (#1911)
1 parent 7babb7a commit 89188e4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

apps/api/buildspec.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,20 @@ phases:
5050

5151
- echo "Checking build output..."
5252
- ls -la dist/
53-
- ls -la dist/src/
54-
- '[ -f "dist/src/main.js" ] || { echo "❌ main.js not found in dist/src"; exit 1; }'
53+
- ls -la dist/apps/api/src/ || ls -la dist/src/
54+
- '[ -f "dist/apps/api/src/main.js" ] || [ -f "dist/src/main.js" ] || { echo "❌ main.js not found"; exit 1; }'
5555

5656
- mkdir -p ../docker-build
57-
- cp -r dist/* ../docker-build/
57+
# Handle both output structures (dist/apps/api/src or dist/src)
58+
- |
59+
if [ -d "dist/apps/api/src" ]; then
60+
echo "Using composite output structure..."
61+
cp -r dist/apps/api/* ../docker-build/
62+
else
63+
echo "Using standard output structure..."
64+
cp -r dist/* ../docker-build/
65+
fi
5866
- cp -r prisma ../docker-build/
59-
6067
- echo "Verifying copied files..."
6168
- ls -la ../docker-build/
6269
- ls -la ../docker-build/src/

0 commit comments

Comments
 (0)