🔹 构建
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
🏗️ 通过 Capgo Cloud 管理原生 iOS/Android 构建。
🚀 初始化
标题: “ 🚀 初始化”别名: onboarding
npx @capgo/cli@latest build init交互式设置 iOS 构建凭据(自动创建证书和配置文件)
🔹 请求
标题: “ 🔹 请求”npx @capgo/cli@latest build request从 Capgo Cloud 请求一个原生构建。
此命令将压缩您的项目目录并将其上传到 Capgo 进行构建。
构建将被处理并直接发送到应用商店。
🔒 安全性:凭据永远不会在 Capgo 服务器上存储。它们在构建完成后会自动删除。
构建输出可选地可用于有限期下载链接。
📋 前置条件:首先使用:
npx @capgo/cli build credentials save --appId <app-id> --platform <ios|android>
示例:
npx @capgo/cli@latest build request com.example.app --platform ios --path .选项:
| 参数 | 类型 | 描述 |
|---|---|---|
| —path | string | 构建的项目目录路径(默认:当前目录) |
| —platform | string | 目标平台:ios 或 android(必填) |
| —build-mode | string | 构建模式:调试或发布(默认:发布) |
| —build-certificate-base64 | string | iOS:Base64编码的.p12证书 |
| —p12-password | string | iOS:证书密码(如果证书没有密码,则可选) |
| —apple-id | string | iOS:Apple ID邮箱 |
| —apple-app-specific-password | string | iOS:App特定密码 |
| —apple-key-id | string | iOS:App Store Connect API 密钥 ID |
| —apple-issuer-id | string | iOS: App Store Connect 证书颁发者 ID |
| —apple-key-content | string | iOS: Base64-encoded App Store Connect API key (.p8) |
| —app-store-connect-team-id | string | iOS: App Store Connect 团队 ID |
| —ios-scheme | string | iOS: Xcode 构建方案 (默认: App) |
| —ios-target | string | iOS: Xcode 构建目标 (读取构建设置时使用, 默认: 构建方案) |
| —ios-distribution | string | iOS: 发布模式 |
| —ios-配置-profile | string | iOS: 配置文件路径或bundleId=path映射(可重复) |
| —android-keystore-file | string | Android: Base64编码的keystore文件 |
| —keystore-key-alias | string | Android: Keystore密钥别名 |
| —keystore-key-password | string | Android: Keystore密钥密码 |
| —keystore-store-password | string | Android: Keystore存储密码 |
| —play-config-json | string | Android: Base64编码的Google Play服务账户JSON |
| —android-variant | string | Android: 产品变体用于构建(例如生产)。如果您的项目具有多个变体,则必填。 |
| —no-playstore-upload | boolean | 为此构建跳过Play Store上传(清除保存的Play配置)。需要—output-upload。 |
| —output-upload | boolean | 为此构建覆盖输出上传行为(启用)。优先级:CLI > env > 保存的凭据 |
| —no-output-upload | boolean | 为此构建覆盖输出上传行为(禁用)。优先级:CLI > env > 保存的凭据 |
| —output-retention | string | 为此构建覆盖输出链接TTL(1小时到7天)。示例:1小时,6小时,2天。优先级:CLI > env > 保存的凭据 |
| —skip-build-number-bump | boolean | 跳过自动构建号/版本code递增。使用项目文件中的版本号。 |
| —no-skip-build-number-bump | boolean | 覆盖保存的凭据以重新启用此构建的自动构建号递增。 |
| -a, | string | API key to link to your account |
| —supa-host | string | 自定义 Supabase 主机 URL(用于自主托管或 Capgo 开发) |
| —supa-anon | string | 自定义 Supabase 匿名密钥(用于自主托管) |
| —verbose | boolean | 启用详细日志的verbose输出 |
🔹 凭据
标题: 🔹 凭据npx @capgo/cli@latest build credentials管理本地机器上存储的构建凭据。 🔒 安全性:
- 凭据保存到 ~/.capgo-credentials/credentials.json (全局) 或 .capgo-credentials.json (本地)
- 在构建时,发送到 Capgo 但永远不存储
- 从 Capgo 立即删除构建后
- 构建输出可选上传用于时间限制下载链接 📚 文档: iOS 配置: https://capgo.app/docs/cli/cloud-build/ios/ Android 配置: https://capgo.app/docs/cli/cloud-build/android/