Files
WerkoutIOS/scripts/smoke/build_ios.sh

24 lines
739 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT_DIR"
LOG_FILE="${TMPDIR:-/tmp}/werkout_smoke_ios.log"
set -o pipefail
xcodebuild -project iphone/Werkout_ios.xcodeproj \
-scheme 'Werkout_ios' \
-configuration Debug \
-destination 'generic/platform=iOS' \
-derivedDataPath /tmp/werkout_smoke_ios_dd \
CODE_SIGNING_ALLOWED=NO \
build 2>&1 | tee "$LOG_FILE"
FILTERED_ISSUES="$(rg -n "warning:|error:" "$LOG_FILE" | rg -v "Metadata extraction skipped. No AppIntents.framework dependency found." || true)"
if [[ -n "$FILTERED_ISSUES" ]]; then
echo "iOS build produced warnings/errors. See $LOG_FILE" >&2
echo "$FILTERED_ISSUES" | sed -n '1,120p' >&2
exit 1
fi