使用 Git 子模块
了解如何配置 EAS Build 以使用 git 子模块。
使用默认版本控制系统 (VCS) 工作流程时,工作目录的内容将按原样上传到 EAS Build,包括 Git 子模块的内容。但是,如果你正在 CI 上构建或在 eas.json 中将 cli.requireCommit
设置为 true
或在私有存储库中有子模块,则需要对其进行初始化以避免上传空目录。
¥When using the default Version Control Systems (VCS) workflow, the content of your working directory is uploaded to EAS Build as it is, including the content of Git submodules. However, if you are building on CI or have cli.requireCommit
set to true
in eas.json or have a submodule in a private repository, you will need to initialize it to avoid uploading empty directories.
子模块初始化
¥Submodules initialization
要在 EAS Build 构建器上初始化子模块:
¥To initialize a submodule on EAS Build builder:
1
Create a secret with a base64 encoded private SSH key that has permission to access submodule repositories.
2
Add an eas-build-pre-install
npm hook to check out those submodules, for example:
!!!IG0!!!