SPB Git

Repository Public

build.sh 1.2 KB 17 lines shellscript

1#!/usr/bin/env bash2# Author: Simon-Pierre Boucher — contact@spboucher.ai3# File: Scripts/build.sh4# Description: Generates the Xcode project and builds SP Wallet (errors only on the console).5#6# Usage: Scripts/build.sh [Debug|Release] [derived-data-suffix]     Debug = the development variant "SP Wallet Dev".7# Products go outside ~/Desktop. Several builds may run at once when each uses its own suffix; project generation is serialized.8set -uo pipefail9cd "$(dirname "$0")/.."10CONFIG="${1:-Debug}"; SUF="${2:-}"; DD="$HOME/Library/Developer/SPWallet/DerivedData${SUF:+-$SUF}"; mkdir -p Build "$DD"11LOG="Build/build${SUF:+-$SUF}.log"12until mkdir Build/.gen.lock 2>/dev/null; do sleep 0.3; done; xcodegen generate --quiet; rmdir Build/.gen.lock13EXTRA=(); [[ "$CONFIG" == Debug && ! -d Build/profiles ]] && EXTRA=(CODE_SIGN_IDENTITY=- PROVISIONING_PROFILE_SPECIFIER= CODE_SIGN_ENTITLEMENTS=Resources/SPWallet-DevAdhoc.entitlements)14xcodebuild -project SPWallet.xcodeproj -scheme SPWallet -configuration "$CONFIG" -derivedDataPath "$DD" build ${EXTRA[@]+"${EXTRA[@]}"} 2>&1 | sed 's/\x1b\[[0-9;]*m//g' > "$LOG"15grep -E "error:|BUILD" "$LOG" | sed -E "s#$PWD/##" | grep -v "^ *|" | sort -u | cut -c1-320 | head -"${LINES_MAX:-60}"16grep -q "BUILD SUCCEEDED" "$LOG"17
Files main
Menu

Theme