跳过内容

🔹 构建

🏗️ 通过 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 .

选项:

参数类型描述
—pathstring构建的项目目录路径(默认:当前目录)
—platformstring目标平台:ios 或 android(必填)
—build-modestring构建模式:调试或发布(默认:发布)
—build-certificate-base64stringiOS:Base64编码的.p12证书
—p12-passwordstringiOS:证书密码(如果证书没有密码,则可选)
—apple-idstringiOS:Apple ID邮箱
—apple-app-specific-passwordstringiOS:App特定密码
—apple-key-idstringiOS:App Store Connect API 密钥 ID
—apple-issuer-idstringiOS: App Store Connect 证书颁发者 ID
—apple-key-contentstringiOS: Base64-encoded App Store Connect API key (.p8)
—app-store-connect-team-idstringiOS: App Store Connect 团队 ID
—ios-schemestringiOS: Xcode 构建方案 (默认: App)
—ios-targetstringiOS: Xcode 构建目标 (读取构建设置时使用, 默认: 构建方案)
—ios-distributionstringiOS: 发布模式
—ios-配置-profilestringiOS: 配置文件路径或bundleId=path映射(可重复)
—android-keystore-filestringAndroid: Base64编码的keystore文件
—keystore-key-aliasstringAndroid: Keystore密钥别名
—keystore-key-passwordstringAndroid: Keystore密钥密码
—keystore-store-passwordstringAndroid: Keystore存储密码
—play-config-jsonstringAndroid: Base64编码的Google Play服务账户JSON
—android-variantstringAndroid: 产品变体用于构建(例如生产)。如果您的项目具有多个变体,则必填。
—no-playstore-uploadboolean为此构建跳过Play Store上传(清除保存的Play配置)。需要—output-upload。
—output-uploadboolean为此构建覆盖输出上传行为(启用)。优先级:CLI > env > 保存的凭据
—no-output-uploadboolean为此构建覆盖输出上传行为(禁用)。优先级:CLI > env > 保存的凭据
—output-retentionstring为此构建覆盖输出链接TTL(1小时到7天)。示例:1小时,6小时,2天。优先级:CLI > env > 保存的凭据
—skip-build-number-bumpboolean跳过自动构建号/版本code递增。使用项目文件中的版本号。
—no-skip-build-number-bumpboolean覆盖保存的凭据以重新启用此构建的自动构建号递增。
-a,stringAPI key to link to your account
—supa-hoststring自定义 Supabase 主机 URL(用于自主托管或 Capgo 开发)
—supa-anonstring自定义 Supabase 匿名密钥(用于自主托管)
—verboseboolean启用详细日志的verbose输出
终端窗口
npx @capgo/cli@latest build credentials

管理本地机器上存储的构建凭据。 🔒 安全性: