Compare commits

...

3 Commits

Author SHA1 Message Date
wangjia b682b7ea88 ci: iOS 临时钥匙串补导 WWDR 中间证书——修独占搜索列表后 unable to build chain
Design Source Checks / design-source (push) Successful in 20s
Deploy Client / build-client-web (push) Successful in 49s
Deploy Client / build-windows (push) Successful in 2m10s
Deploy Client / build-macos (push) Successful in 2m38s
Deploy Client / build-android (push) Successful in 1m17s
Deploy Client / build-ios (push) Successful in 3m41s
Deploy Client / release-deploy-client (push) Successful in 1m30s
p12 只含叶子证书;独占后 login 里的 Apple WWDR 中间证书不可见,
codesign 报 errSecInternalComponent。建 keychain 时从本机 login/System
导出 WWDR(纯公钥)一并导入。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
2026-07-07 14:28:18 +08:00
wangjia 3810876395 ci: iOS 构建期临时钥匙串独占搜索列表——隔离本机其他项目的同名分发证书
Design Source Checks / design-source (push) Successful in 2m23s
Deploy Client / build-client-web (push) Successful in 3m4s
Deploy Client / build-windows (push) Successful in 3m57s
Deploy Client / build-macos (push) Successful in 4m16s
Deploy Client / build-android (push) Successful in 2m29s
Deploy Client / build-ios (push) Failing after 1m22s
Deploy Client / release-deploy-client (push) Has been skipped
根因:mac runner 即本机,login 钥匙串出现第二张「Apple Distribution」证书
(另一项目 2026-07-07 新建)后,xcodebuild 优先选中新证书,与 Jiu App Store
profile(嵌 6/16 正牌证书)不配对 → archive 失败。
修复:构建期 list-keychains 只留临时 keychain(fastlane 同款),trap 恢复 login。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
2026-07-07 14:04:49 +08:00
wangjia 43576d6248 chore: release client-v1.1.6
Design Source Checks / design-source (push) Successful in 30s
Deploy Client / build-client-web (push) Successful in 58s
Deploy Client / build-macos (push) Successful in 3m1s
Deploy Client / build-android (push) Successful in 1m50s
Deploy Client / build-ios (push) Failing after 55s
Deploy Client / build-windows (push) Successful in 2m5s
Deploy Client / release-deploy-client (push) Has been skipped
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
2026-07-07 13:39:38 +08:00
2 changed files with 30 additions and 2 deletions
+12
View File
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.6] - 2026-07-07
### 新功能
- 库存三态管理:状态列改为「在售 / 库存 / 已售」。商品详情抽屉的状态徽章旁
新增开关,一键把商品挂上/撤下公开酒单(桌面与手机都支持);只有挂「在售」
的商品才会出现在店铺公开页。
- 卖光的商品以「已售」留痕:点库存页「已售」统计卡查看,平时列表不显示。
### 改进
- 库存筛选改为「全部 / 在售 / 库存 / 已售」;低库存提示改由数量颜色标注
(红=缺货、橙=低于安全库存)。
## [1.1.5] - 2026-07-06
### 新功能
+18 -2
View File
@@ -37,6 +37,8 @@ fi
WORK="$(mktemp -d)"
cleanup() {
# 恢复默认搜索列表(构建期临时独占,见下)——失败路径也必须恢复
security list-keychains -d user -s login.keychain-db 2>/dev/null || true
security delete-keychain "$KEYCHAIN" 2>/dev/null || true
rm -rf "$WORK"
rm -f "$HOME/Library/MobileDevice/Provisioning Profiles/jiu-ci.mobileprovision" 2>/dev/null || true
@@ -53,10 +55,24 @@ security unlock-keychain -p "$KEYCHAIN_PWD" "$KEYCHAIN"
echo "${IOS_DIST_CERT_P12_BASE64}" | base64 --decode > "$WORK/dist.p12"
security import "$WORK/dist.p12" -k "$KEYCHAIN" \
-P "${IOS_DIST_CERT_PASSWORD:-}" -T /usr/bin/codesign -T /usr/bin/security
# 补齐证书链:p12 只含叶子证书,独占搜索列表后 login 里的 Apple WWDR 中间证书
# 不可见会报 errSecInternalComponent(unable to build chain)——把本机已有的
# WWDR 中间证书(纯公钥)一并导入临时 keychain。
security find-certificate -a -c "Apple Worldwide Developer Relations" -p \
~/Library/Keychains/login.keychain-db /Library/Keychains/System.keychain \
> "$WORK/wwdr.pem" 2>/dev/null || true
if [ -s "$WORK/wwdr.pem" ]; then
security import "$WORK/wwdr.pem" -k "$KEYCHAIN" -T /usr/bin/codesign 2>/dev/null || true
else
echo "WARN: 本机未找到 Apple WWDR 中间证书,签名可能报 unable to build chain" >&2
fi
# 允许 codesign 非交互访问私钥
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PWD" "$KEYCHAIN" >/dev/null
# 把临时 keychain 加入搜索列表(保留默认 login keychain
security list-keychains -d user -s "$KEYCHAIN" login.keychain-db
# 构建期独占搜索列表(fastlane 同款):只见临时 keychain,隔离本机其他项目的
# 同名「Apple Distribution」证书(2026-07-07 事故:login 里另一项目的新证书被
# xcodebuild 优先选中,与 Jiu App Store profile 不配对 → archive 失败)。
# trap cleanup 恢复 login,失败路径也不遗留。
security list-keychains -d user -s "$KEYCHAIN"
# --- 2. 安装 provisioning profile ---
PROFILES_DIR="$HOME/Library/MobileDevice/Provisioning Profiles"