#!/bin/bash set -euo pipefail # This script is for checking that both Mac and iOS targets build and that tests pass. # Note: depends on xcbeautify: # === CONFIGURABLE VARIABLES === PROJECT_PATH="NetNewsWire.xcodeproj" SCHEME_MAC="NetNewsWire" SCHEME_IOS="NetNewsWire-iOS" DESTINATION_MAC="platform=macOS,arch=arm64" DESTINATION_IOS="platform=iOS Simulator,name=iPhone 16" echo "๐Ÿ›  Building macOS target..." xcodebuild \ -project "$PROJECT_PATH" \ -scheme "$SCHEME_MAC" \ -destination "$DESTINATION_MAC" \ clean build | xcbeautify echo "๐Ÿ›  Building iOS target..." xcodebuild \ -project "$PROJECT_PATH" \ -scheme "$SCHEME_IOS" \ -destination "$DESTINATION_IOS" \ clean build | xcbeautify echo "โœ… Builds completed." echo "๐Ÿงช Running tests for macOS target..." xcodebuild \ -project "$PROJECT_PATH" \ -scheme "$SCHEME_MAC" \ -destination "$DESTINATION_MAC" \ test | xcbeautify echo "๐Ÿงช Running tests for iOS target..." xcodebuild \ -project "$PROJECT_PATH" \ -scheme "$SCHEME_IOS" \ -destination "$DESTINATION_IOS" \ test | xcbeautify echo "๐ŸŽ‰ All builds and tests completed successfully."