Repository Public
1#!/usr/bin/env bash2# Builds SP Browser (Debug by default) and prints only errors, warnings and the result.3# Usage: scripts/build.sh [Debug|Release]4set -uo pipefail5cd "$(dirname "$0")/.."6CONFIG="${1:-Debug}"7command -v xcodegen >/dev/null && xcodegen generate --quiet8xcodebuild -project SPBrowser.xcodeproj -scheme SPBrowser -configuration "$CONFIG" \9 -derivedDataPath build/DerivedData -destination 'platform=macOS,arch=arm64' build 2>&1 \10 | grep -E "^/.*(error|warning):|BUILD (SUCCEEDED|FAILED)" | sed "s|$PWD/||" | sort -u11exit "${PIPESTATUS[0]}"12