Files
adminandClaude Opus 4.8 b9327eee8b fix(ios): 修复 deploy.sh 旧路径 与 renew.sh --check 两处 bug
- deploy.sh: cd 硬编码旧 /Desktop/ruoyi 路径, 改为 dirname $0 自适应

- renew.sh: prof_expiry_epoch 改用 security cms 抠 ISO8601 按 UTC 解析(原 PlistBuddy+%Z 在 macOS date -j 下静默失败); 到期解析失败时 --check 补只读兜底 exit 防误删; 修 $BACKUP_DIR 紧跟全角逗号在 set -u 下的 unbound 崩溃

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-17 19:09:39 +08:00

38 lines
1.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 真机部署脚本:编译 GlassRemote 并安装到吴小苏的iPhone(WiFi 配对通道)
# 用法: bash deploy.sh (Xcode 需已登录 Apple ID 且团队可用)
set -u
cd "$(dirname "$0")"
TEAM=H2C3YSR973
UDID=D469A28E-D29F-54A0-8936-0EA41BA02DA2
DD=/tmp/dd_deploy
LOG=/tmp/deploy_now.log
: > "$LOG"
echo "=== [1/2] 编译并签名 ===" | tee -a "$LOG"
xcodebuild -project GlassRemote.xcodeproj -scheme GlassRemote \
-destination "platform=iOS,id=$UDID" \
-derivedDataPath "$DD" \
DEVELOPMENT_TEAM=$TEAM CODE_SIGN_STYLE=Automatic \
-allowProvisioningUpdates \
build 2>&1 | tee -a "$LOG"
BUILD_EXIT=${PIPESTATUS[0]}
echo "BUILD_EXIT=$BUILD_EXIT" | tee -a "$LOG"
if [ "$BUILD_EXIT" != "0" ]; then
echo "!!! 编译失败,停止" | tee -a "$LOG"
exit 1
fi
APP=$(find "$DD" -name "GlassRemote.app" -type d | head -1)
echo "APP=$APP" | tee -a "$LOG"
if [ -z "$APP" ]; then
echo "!!! 未找到 .app" | tee -a "$LOG"
exit 1
fi
echo "=== [2/2] 安装到 iPhone ===" | tee -a "$LOG"
xcrun devicectl device install app --device "$UDID" "$APP" 2>&1 | tee -a "$LOG"
echo "INSTALL_EXIT=${PIPESTATUS[0]}" | tee -a "$LOG"
echo "=== DONE ===" | tee -a "$LOG"