SPB Git

Repository Public

build.sh 1.4 KB 19 lines shellscript

1#!/usr/bin/env bash2# Author: Simon-Pierre Boucher — contact@spboucher.ai3# File: Scripts/build.sh4# Description: Development entry point: generate the Xcode project, build Debug, run the core tests and the UI tests.5#6# Usage: Scripts/build.sh generate|debug|core-test|ui-test7# Build products go to ~/Library/Developer/VQuant (outside ~/Desktop: TCC and Launch Services treat Desktop specially).8set -euo pipefail9cd "$(dirname "$0")/.."10DD="${VQ_DERIVED:-$HOME/Library/Developer/VQuant/DerivedData}"11filter() { grep -E "error:|warning: unre|\*\* BUILD|\*\* TEST|Test Suite .* (passed|failed)|Executed|✘|Test run with|recorded an issue|failed after" | sed 's/\x1b\[[0-9;]*m//g' | sort -u | head -"${LINES_MAX:-60}" || true; }12case "${1:-debug}" in13  generate) xcodegen generate --quiet && echo "VQuant.xcodeproj generated" ;;14  debug)    xcodegen generate --quiet; xcodebuild -project VQuant.xcodeproj -scheme VQuant -configuration Debug -derivedDataPath "$DD" -destination 'platform=macOS,arch=arm64' build 2>&1 | filter ;;15  core-test) swift test 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep -E "✘|error:|Test run with|recorded an issue" || true ;;16  ui-test)  xcodegen generate --quiet; xcodebuild -project VQuant.xcodeproj -scheme VQuantUITests -configuration Debug -derivedDataPath "$DD" -destination 'platform=macOS,arch=arm64' test 2>&1 | filter ;;17  *) echo "usage: $0 generate|debug|core-test|ui-test" >&2; exit 2 ;;18esac19
Files main
Menu

Theme