-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.yml
More file actions
132 lines (129 loc) · 6.42 KB
/
Copy pathproject.yml
File metadata and controls
132 lines (129 loc) · 6.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Perch
options:
bundleIdPrefix: tech.xvanturing
deploymentTarget:
macOS: "15.0"
createIntermediateGroups: true
groupSortPosition: top
packages:
KeyboardShortcuts:
url: https://github.com/sindresorhus/KeyboardShortcuts
from: "2.0.0"
# Sparkle 2 自动更新框架。装好后:
# - `Sources/Perch/Features/Updater/UpdaterService.swift` 用
# `SPUStandardUpdaterController` 驱动整条更新流程(拉 appcast、
# EdDSA 校验、下载、out-of-process 安装、重启)。
# - `scripts/release.sh` 用 SPM artifact 里的 `sign_update` 工具
# 给每个 release 的 zip 签 EdDSA,把 `<item>` 插进 appcast.xml。
# - Perch **不在 sandbox**,所以省掉了 Installer XPC service +
# `-spks`/`-spki` mach-lookup entitlements,集成比 sandboxed App
# 简单不少。
Sparkle:
url: https://github.com/sparkle-project/Sparkle.git
from: "2.9.1"
# WYSIWYG Markdown 引擎(自维护 fork)—— 全 app 唯一的便签编辑器后端。
# 仓库无 semver tag,pin 到具体 commit。三个 product:
# - MarkdownEngine 核心 TextKit2 编辑器(零外部依赖)
# - MarkdownEngineCodeBlocks HighlighterSwift 代码高亮 turnkey bridge
# - MarkdownEngineLatex SwiftMath LaTeX turnkey bridge
# 后两者把 HighlighterSwift / SwiftMath 作为传递依赖带进来。
MarkdownEngine:
url: https://github.com/nodes-app/swift-markdown-engine
branch: 0.5.0
settings:
base:
SWIFT_VERSION: "5.0"
MACOSX_DEPLOYMENT_TARGET: "15.0"
PRODUCT_NAME: Perch
# Hardened Runtime 是 Developer ID 公证的硬性要求(notarytool 拒绝未启用的 .app)。
# 也是 dev 阶段就开,免得 release 时再排查 unentitled framework 之类的兼容性问题。
ENABLE_HARDENED_RUNTIME: YES
# T8F5T6HKG8 = "Shenzhen Zhiqishidai Technology" 企业账号。
# ⚠️ CloudKit container `iCloud.tech.xvanturing.Perch` 需要在该 team 的
# Apple Developer portal(https://developer.apple.com/account/resources/identifiers/list/cloudContainer)
# 下手动创建,Identifier 完全一致;App ID `tech.xvanturing.Perch` 也要
# 在同一 team 注册并勾上 iCloud + Push Notifications capability。
DEVELOPMENT_TEAM: T8F5T6HKG8
DEAD_CODE_STRIPPING: YES
GENERATE_INFOPLIST_FILE: NO
SWIFT_STRICT_CONCURRENCY: minimal
configs:
Debug:
# 开发期 Apple Development 自动签名,entitlements 走 development APS
# (CloudKit Dev 环境)。
CODE_SIGN_STYLE: Automatic
CODE_SIGN_IDENTITY: "Apple Development"
Release:
# Release **build 阶段**也用 Apple Development 自动签名 —— 这只是为了让
# archive 能编译过。真正的 Developer ID 签名在 release.sh 的
# `xcodebuild -exportArchive` 阶段做,通过 ExportOptions.plist 指定
# method=developer-id,Xcode 会自动 fetch Developer ID profile 并重签。
# 这是 Apple canonical 的 Direct Distribution 流程。
CODE_SIGN_STYLE: Automatic
CODE_SIGN_IDENTITY: "Apple Development"
# --timestamp:RFC 3161 时间戳,公证强制要求。Release 阶段 export 时由
# ExportOptions.plist 的 signingOptions 接管,这里加上保险一层。
OTHER_CODE_SIGN_FLAGS: "--timestamp"
targets:
Perch:
type: application
platform: macOS
sources:
- path: Sources/Perch
excludes:
- "Resources/**"
# Resources/** 整体排除是因为 Info.plist / entitlements 由 info.path 和
# CODE_SIGN_ENTITLEMENTS 单独 wire,不能再走 Sources。AppIcon 的资产目录
# 必须手动加回来,否则 Xcode 编译时找不到 CFBundleIconName 指向的资源。
- Sources/Perch/Resources/Assets.xcassets
dependencies:
- package: KeyboardShortcuts
- package: Sparkle
product: Sparkle
- package: MarkdownEngine
product: MarkdownEngine
- package: MarkdownEngine
product: MarkdownEngineCodeBlocks
- package: MarkdownEngine
product: MarkdownEngineLatex
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: tech.xvanturing.Perch
configs:
# Debug 用开发环境 entitlements(aps-environment=development → CloudKit Dev)。
Debug:
CODE_SIGN_ENTITLEMENTS: Sources/Perch/Resources/Perch.entitlements
# Release 用 production entitlements(aps-environment=production → CloudKit Prod)。
# 部署 schema 到 Production 见 CLAUDE.md "Schema → CloudKit deployment workflow"。
Release:
CODE_SIGN_ENTITLEMENTS: Sources/Perch/Resources/Perch-Release.entitlements
info:
path: Sources/Perch/Resources/Info.plist
properties:
CFBundleName: Perch
CFBundleDisplayName: Perch
CFBundleShortVersionString: "2.2.0"
CFBundleVersion: "15"
CFBundlePackageType: APPL
LSMinimumSystemVersion: "15.0"
# 应用分类(便签 = 效率工具)。消除打包时 "No App Category is set" 警告,
# 也是 Finder / App Store 元数据。等价于 Xcode General 标签里的 Category。
LSApplicationCategoryType: public.app-category.productivity
LSUIElement: true
NSHumanReadableCopyright: "© 2026 xVanTuring"
NSPrincipalClass: NSApplication
CFBundleIconName: AppIcon
# ── Sparkle 2 自动更新 ──────────────────────────────────────
# Appcast feed 托管在 GitHub repo 的 main 分支:每次 release.sh
# 跑完会 commit + push 更新后的 appcast.xml。Sparkle 默认从
# raw.githubusercontent.com 这个 URL 拉取。
SUFeedURL: "https://raw.githubusercontent.com/xVanTuring/Perch/main/appcast.xml"
# 默认定期检查间隔(秒)。用户在 Settings → Updates 改了之后,Sparkle
# 把新值持久化到自己的 defaults domain,这里只是首次安装的初值(每天)。
SUScheduledCheckInterval: 86400
# EdDSA 公钥 —— Sparkle 用它校验下载的 zip 签名;私钥由发布机的
# login keychain(`https://sparkle-project.org` item)持有,由
# release.sh 调 `sign_update` 时读取。生成步骤见 docs/release.md。
# ⚠️ 首次发布前必须填上,否则 release.sh preflight 会拒绝运行。
# 一旦发布后**严禁**更换公钥,否则已装版本会拒绝所有未来更新。
SUPublicEDKey: "g3SCjADYsXhMN5/4hnQZ7eOawvtVoGJJsS5CFew15WQ="