SPB Git

Repository Public

build.sh 1.9 KB 36 lines shellscript

1#!/bin/bash2# NEXTERM build helper. Filters the xcodebuild noise that Xcode 27.2 on macOS 27.0 prints3# about the broken CoreDevice/CoreSimulator plug-ins (irrelevant for a macOS app).4#   Scripts/build.sh generate        # xcodegen generate5#   Scripts/build.sh debug|release   # build the app6#   Scripts/build.sh kit-test        # swift test for NEXTERMKit (fast, no Xcode)7#   Scripts/build.sh test            # xcodebuild test (unit + UI)8#   Scripts/build.sh run             # build debug and launch9#   Scripts/build.sh app-path [debug|release]10set -euo pipefail11cd "$(dirname "$0")/.."12DD="build/DerivedData"13NOISE='DVTPlugIn|CoreSimulator|Simulator device|CoreDevice|DVTDevice|DVTErrorPresenter|Referenced from|Expected in|feedbackassistant|Recovery Suggestion|^Code: 3|^Thread:|^Method:|^Object:|^Details:|^\s*$|Please file a bug|DVTAssertions|Unable to load simulator'14XCB="xcodebuild -project NEXTERM.xcodeproj -scheme NEXTERM -derivedDataPath $DD -skipPackagePluginValidation"1516cmd="${1:-debug}"17case "$cmd" in18  generate) xcodegen generate ;;19  debug|release)20    cfg=Debug; [ "$cmd" = release ] && cfg=Release21    $XCB -configuration "$cfg" build 2>&1 | grep -vE "$NOISE" | grep -E "error:|warning: .*/(Sources|NEXTERMKit)/|\*\* BUILD|Signing Identity" || true22    test -d "$DD/Build/Products/$cfg/NEXTERM.app" && echo "app: $DD/Build/Products/$cfg/NEXTERM.app"23    ;;24  kit-test) (cd NEXTERMKit && swift test 2>&1 | grep -E "Test run with|✘|error:|Suite .* failed" ) ;;25  test)26    $XCB -configuration Debug test 2>&1 | grep -vE "$NOISE" | grep -E "Test Case|Test Suite|error:|passed|failed|\*\* TEST" | tail -6027    ;;28  run)29    "$0" debug30    pkill -x NEXTERM 2>/dev/null || true31    open "$DD/Build/Products/Debug/NEXTERM.app"32    ;;33  app-path) cfg=Debug; [ "${2:-}" = release ] && cfg=Release; echo "$DD/Build/Products/$cfg/NEXTERM.app" ;;34  *) echo "unknown command $cmd"; exit 2 ;;35esac36
Files main
Menu

Theme