36 lines
1001 B
Bash
36 lines
1001 B
Bash
#!/bin/sh
|
||
set -eu
|
||
cd "$(dirname "$0")/.."
|
||
test -n "${DEVELOPMENT_TEAM:-}" || {
|
||
echo "请设置 DEVELOPMENT_TEAM(Apple Developer Team ID)。" >&2
|
||
exit 1
|
||
}
|
||
./Scripts/fetch-libxray.sh
|
||
./Scripts/generate-project.sh
|
||
xcodebuild \
|
||
-project UCVLZonghengjia.xcodeproj \
|
||
-scheme UCVLZonghengjia \
|
||
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
|
||
DEVELOPMENT_TEAM="$DEVELOPMENT_TEAM" \
|
||
test
|
||
xcodebuild \
|
||
-project UCVLZonghengjia.xcodeproj \
|
||
-scheme UCVLZonghengjia \
|
||
-configuration Release \
|
||
-destination 'generic/platform=iOS' \
|
||
-archivePath build/UCVL-Zonghengjia-1.0.0.xcarchive \
|
||
DEVELOPMENT_TEAM="$DEVELOPMENT_TEAM" \
|
||
archive
|
||
|
||
if [ -n "${EXPORT_OPTIONS_PLIST:-}" ]; then
|
||
test -f "$EXPORT_OPTIONS_PLIST" || {
|
||
echo "EXPORT_OPTIONS_PLIST 指定的文件不存在。" >&2
|
||
exit 1
|
||
}
|
||
xcodebuild \
|
||
-exportArchive \
|
||
-archivePath build/UCVL-Zonghengjia-1.0.0.xcarchive \
|
||
-exportPath build/export \
|
||
-exportOptionsPlist "$EXPORT_OPTIONS_PLIST"
|
||
fi
|