SPB Git

Repository Public License

build.sh 3.2 KB 64 lines shellscript

1#!/usr/bin/env bash2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : ORIX Monitor8# File             : Scripts/build.sh9# Description      : generate | debug | release | test | uitest | all — project10#                    generation, builds and test suites.11# Module           : Scripts12# Repository       : https://git.spboucher.ai/orix-monitor13# Created          : 2026-11-2114# Last Modified    : 2026-11-2115#16# Author           : Simon-Pierre Boucher17# Position         : Professor of Finance18# Institution      : Université du Québec en Outaouais (UQO)19# Organization     : SP Boucher20# Website          : https://spboucher.ai21# Git              : https://git.spboucher.ai22#23# Preferred Contact: support@spboucher.ai24# Technical Contact: dev@spboucher.ai25# Security/Admin   : admin@spboucher.ai26#27# Copyright (c) 202628# Simon-Pierre Boucher29# All rights reserved where applicable. This file is governed by the30# applicable project license, copyright notices and relevant law.31# Existing third-party rights and notices remain unaffected.32#33# License          : Proprietary, all rights reserved (see license file)34# License File     : LICENSE35#36# Do not embed credentials, private keys, access tokens,37# certificates or confidential personal information.38#39# =============================================================================40# END OF SP BOUCHER SOURCE HEADER41# =============================================================================4243set -euo pipefail44cd "$(dirname "$0")/.."45PROJECT=ORIXMonitor.xcodeproj46case "${1:-debug}" in47  generate) xcodegen generate ;;48  debug)    xcodegen generate >/dev/null; Scripts/xb.sh Debug ;;49  test)     ( cd Packages/ORIXMonitorCore && swift test 2>&1 | grep -E "error:|recorded an issue|Test run" ) ;;50  uitest)   xcodegen generate >/dev/null51            xcodebuild -project "$PROJECT" -scheme ORIXMonitor -derivedDataPath build/dd test 2>&1 \52              | grep -E "^Test Case .*(passed|failed|skipped)|Executed [1-9]|\*\* TEST|: error: " | sed "s|$PWD/||" | sort -u ;;53  release)54    # Apple Silicon only: the app has never been run on an Intel Mac, so no Intel slice is shipped.55    xcodegen generate >/dev/null56    xcodebuild -project "$PROJECT" -scheme ORIXMonitor -configuration Release -derivedDataPath build/rel ARCHS=arm64 ONLY_ACTIVE_ARCH=NO build 2>&1 \57      | grep -E "error:|warning: .*(deprecated|unused)|\*\* " | sed "s|$PWD/||" | sort -u58    rm -rf "dist/ORIX Monitor.app"; mkdir -p dist59    ditto "build/rel/Build/Products/Release/ORIX Monitor.app" "dist/ORIX Monitor.app"60    echo "dist/ORIX Monitor.app: $(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "dist/ORIX Monitor.app/Contents/Info.plist") ($(/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' "dist/ORIX Monitor.app/Contents/Info.plist")), $(lipo -archs "dist/ORIX Monitor.app/Contents/MacOS/ORIX Monitor")" ;;61  all)      "$0" test && "$0" debug && "$0" uitest ;;62  *) echo "usage: $0 generate|debug|release|test|uitest|all" >&2; exit 2 ;;63esac64
Files main
Menu

Theme