MovieMapper/build.sh
jarianc 00d8e072c5 feat: Add Rust UI and backend implementation with project infrastructure
Adds the new Rust-based UI (iced), backend service, shared Swift models,
CI/CD workflows, build scripts, and project documentation.
2026-08-19 21:22:08 -05:00

53 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# build.sh - Build for simulator and device
# Usage: ./build.sh [simulator|device] [Debug|Release]
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$SCRIPT_DIR/MovieMapper-iOS"
SCHEME="MovieMapper-iOS"
# Default values
BUILD_TARGET="${1:-simulator}"
BUILD_CONFIG="${2:-Debug}"
# Validate configuration
if [[ "$BUILD_CONFIG" != "Debug" && "$BUILD_CONFIG" != "Release" ]]; then
echo "Error: Build configuration must be 'Debug' or 'Release'"
exit 1
fi
echo "=== MovieMapper iOS Build Script ==="
echo "Target: $BUILD_TARGET"
echo "Configuration: $BUILD_CONFIG"
echo ""
cd "$PROJECT_DIR"
if [[ "$BUILD_TARGET" == "simulator" ]]; then
echo "Building for iOS Simulator..."
xcodebuild -scheme "$SCHEME" \
-configuration "$BUILD_CONFIG" \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPad Pro (12.9-inch) (17th generation)' \
clean build
echo ""
echo "✓ Build completed for iOS Simulator"
elif [[ "$BUILD_TARGET" == "device" ]]; then
echo "Building for iOS Device..."
xcodebuild -scheme "$SCHEME" \
-configuration "$BUILD_CONFIG" \
-sdk iphoneos \
-destination 'generic/platform=iOS' \
clean build
echo ""
echo "✓ Build completed for iOS Device"
else
echo "Error: Target must be 'simulator' or 'device'"
exit 1
fi