SPB Git

Repository Public

build.sh 1.1 KB 19 lines shellscript

1#!/bin/bash2# Generates the Xcode project and builds the app.3#   Scripts/build.sh [Debug|Release]      (default Debug; Release needs the Developer ID profile, see docs/APPLE-APPS.md)4# Environment: MCC_DERIVED_DATA (default /tmp/mcc-swift/DerivedData) — keep it OUTSIDE ~/Desktop.5set -euo pipefail6cd "$(dirname "$0")/.."7CONFIG="${1:-Debug}"8DD="${MCC_DERIVED_DATA:-/tmp/mcc-swift/DerivedData}"9# The project is generated next to the derived data, not in the sources: concurrent builds do not step on each other.10PROJ="$DD.project"11mkdir -p "$PROJ"12xcodegen generate --quiet --spec project.yml --project "$PROJ" --project-root .13set -o pipefail14xcodebuild -project "$PROJ/MCC.xcodeproj" -scheme MCC -configuration "$CONFIG" -derivedDataPath "$DD" -destination 'platform=macOS,arch=arm64' \15  -skipPackagePluginValidation -skipMacroValidation MCC_ROOT="$PWD" build 2>&1 | tee "$DD.build.log" \16  | grep -E "^/.*(error|warning: unre)|error:|BUILD (SUCCEEDED|FAILED)" | grep -v "^\s*$" | sort -u || true17grep -q "BUILD SUCCEEDED" "$DD.build.log"18echo "$DD/Build/Products/$CONFIG/MacLustr Command Center.app"19
Files main
Menu

Theme