26 lines
1.5 KiB
Bash
Executable File
26 lines
1.5 KiB
Bash
Executable File
# iphone6s b88a4ca32d76952f98e1e8ca06e4672049d0548a
|
||
# iphone12 00008101-0016601022C0001E
|
||
|
||
# WDA
|
||
cd ~/yfz/code/WebDriverAgent
|
||
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner build-for-testing -destination id=00008101-0016601022C0001E -allowProvisioningUpdates
|
||
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner USE_IP=127.0.0.1 test-without-building -destination id=00008101-0016601022C0001E
|
||
|
||
# Fastbot-iOS
|
||
cd ~/yfz/code/Fastbot_iOS/Fastbot-iOS
|
||
xcodebuild -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner IPHONEOS_DEPLOYMENT_TARGET=13.0 build-for-testing -destination id=00008101-0016601022C0001E -allowProvisioningUpdates
|
||
xcodebuild -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner IPHONEOS_DEPLOYMENT_TARGET=13.0 test-without-building BUNDLEID=com.apple.AppStore -destination id=00008101-0016601022C0001E
|
||
|
||
# 检查证书有效期
|
||
PROFILE_DIR="$HOME/Library/Developer/Xcode/UserData/Provisioning Profiles"
|
||
ls "$PROFILE_DIR"
|
||
# 遍历所有 .mobileprovision 文件
|
||
for profile in "$PROFILE_DIR"/*.mobileprovision; do
|
||
if [ -f "$profile" ]; then
|
||
echo "正在检查证书有效期: $profile"
|
||
security cms -D -i "$profile" | grep -A 2 '<key>ExpirationDate</key>' | grep -v '<key>ExpirationDate</key>'
|
||
fi
|
||
done
|
||
|
||
# 证书剩余不足一天后删除所有证书并执行上述WDA和Fastbot-iOS的编译和安装
|
||
# test-without-building安装会自动开始测试,设置3min命令超时自动结束,视为完成 |