-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-all.sh
More file actions
executable file
·37 lines (28 loc) · 940 Bytes
/
Copy pathbuild-all.sh
File metadata and controls
executable file
·37 lines (28 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Build All Script
# Builds the project for all enabled targets
set -e
echo "🔨 Building for all enabled targets..."
# Check if universe.toml exists
if [ ! -f "universe.toml" ]; then
echo "❌ Error: universe.toml not found"
exit 1
fi
# Check if px is available
if ! command -v px &> /dev/null; then
echo "❌ Error: px command not found. Install with: composer global require makalin/php-universe"
exit 1
fi
# Build for each target
TARGETS=("native" "wasm" "ios" "embedded")
for target in "${TARGETS[@]}"; do
if grep -q "\[targets\.$target\]" universe.toml && grep -A 1 "\[targets\.$target\]" universe.toml | grep -q "enabled = true"; then
echo ""
echo "📦 Building for $target..."
px build --target=$target || echo "⚠️ Warning: Build for $target failed"
else
echo "⏭️ Skipping $target (not enabled)"
fi
done
echo ""
echo "✅ Build complete!"