AppCenter: build React-Native project which is 2 levels deep in Git

一个人想着一个人 提交于 2020-05-14 01:24:50

问题


I'm setting up react-native build in AppCenter.

Everything works on test projects, but in a real repository I'm facing the following issue:

For best performance, the analysis is currently limited to four directory levels including the root of your repository. (Quote from official docs)

My package.json is 2 levels deep (/folder1/folder2/package.json), so build.gradle is located 5 levels deep (/folder1/folder2/android/app/build.gradle).

So when I set up the build in AppCenter I'm able to specify the Project field (pointing to my package.json), but Build Variant combobox is empty.

Is there any solution for that? Can I specify Build Variant manually?

P.S. If I simply move the project one folder above - everything works fine. But I can't do that in my monorepository.


回答1:


The workaround we are currently using: we created a separate repo with 1-level less nesting, and I'm copying my folder to another repo on each push (via TeamCity). So, having a repo structure like this:

project
│───frontend
│   └───shared
│   └───web
│   └───react-native
│       │   package.json  --> this is the folder we want to build in AppCenter
│       │   ...
│   
└───backend
    └── somefile.cs

We set up git-hooks to copy the frontend folder to another repo:

root
└───shared
└───web
└───react-native
    │   package.json  --> this is the folder we want to build in AppCenter
    │   ...

So we got one level less deep repository which is ok for AppCenter.



来源:https://stackoverflow.com/questions/55887561/appcenter-build-react-native-project-which-is-2-levels-deep-in-git

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!