iOS 1.0.3 source candidate only; no Apple build or installation acceptance
This commit is contained in:
@@ -5,12 +5,43 @@ test -n "${DEVELOPMENT_TEAM:-}" || {
|
||||
echo "请设置 DEVELOPMENT_TEAM(Apple Developer Team ID)。" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
source_version=$(awk '
|
||||
$1 == "MARKETING_VERSION:" {
|
||||
value = $2
|
||||
sub(/^"/, "", value)
|
||||
sub(/"$/, "", value)
|
||||
if (value !~ /^[0-9]+\.[0-9]+\.[0-9]+$/ || seen++) exit 1
|
||||
version = value
|
||||
}
|
||||
END {
|
||||
if (seen != 1 || version == "") exit 1
|
||||
print version
|
||||
}
|
||||
' project.yml) || {
|
||||
echo "project.yml 必须包含唯一的数字三段 MARKETING_VERSION。" >&2
|
||||
exit 1
|
||||
}
|
||||
archive_path="build/UCVL-Zonghengjia-${source_version}.xcarchive"
|
||||
simulator_destination=${SIMULATOR_DESTINATION:-'platform=iOS Simulator,name=iPhone 16 Pro'}
|
||||
|
||||
if [ -n "${EXPORT_OPTIONS_PLIST:-}" ]; then
|
||||
test -f "$EXPORT_OPTIONS_PLIST" && test -r "$EXPORT_OPTIONS_PLIST" || {
|
||||
echo "EXPORT_OPTIONS_PLIST 必须指定可读的发布选项文件。" >&2
|
||||
exit 1
|
||||
}
|
||||
plutil -lint -- "$EXPORT_OPTIONS_PLIST" >/dev/null || {
|
||||
echo "EXPORT_OPTIONS_PLIST 不是有效的 plist 文件。" >&2
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
./Scripts/fetch-libxray.sh
|
||||
./Scripts/generate-project.sh
|
||||
xcodebuild \
|
||||
-project UCVLZonghengjia.xcodeproj \
|
||||
-scheme UCVLZonghengjia \
|
||||
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
|
||||
-destination "$simulator_destination" \
|
||||
DEVELOPMENT_TEAM="$DEVELOPMENT_TEAM" \
|
||||
test
|
||||
xcodebuild \
|
||||
@@ -18,18 +49,14 @@ xcodebuild \
|
||||
-scheme UCVLZonghengjia \
|
||||
-configuration Release \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-archivePath build/UCVL-Zonghengjia-1.0.0.xcarchive \
|
||||
-archivePath "$archive_path" \
|
||||
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 \
|
||||
-archivePath "$archive_path" \
|
||||
-exportPath build/export \
|
||||
-exportOptionsPlist "$EXPORT_OPTIONS_PLIST"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user