Visual Studio App Center 准备单独的 git 构建

Visual Studio App Center prepare separate git for Build

我正在尝试在 Visual Studio App Center 中为我的 xamarin.android 构建正确引用我的附加 git 中心库。 该库包含在一个单独的 git 存储库中,然后在我的 Visual studio 项目中引用。

为了将库包含在我添加的 "appcenter-post-clone.sh" 文件中,该文件应加载 git 以便参考仍然有效。

回声"Custom_AppCenter_Script"

回声$APPCENTER_SOURCE_DIRECTORY

回显 $PWD

git 克隆 https://github.com/Mygit/Reponame.git

---构建输出:---

Custom_AppCenter_Script

/Users/vsts/agent/2.148.0/work/1/s

/Users/vsts/agent/2.148.0/work/1/s/通量/Flux.Android

正在克隆到 'Aurora'...

##[部分]完成:Post 克隆脚本

##[部分]开始:设置单声道版本

.....

警告:无法找到项目文件 /Users/vsts/agent/2.148.0/work/1/s/../Aurora/Aurora/Aurora.csproj。

我必须如何调整脚本才能使库位于正确的位置?

我找到了解决方案:

将 git 作为子模块添加到存储库,然后将 "appcenter-post-clone.sh" 更改为:

回声"Custom_AppCenter_Script"

git 克隆 --递归 https://github.com/Mygit/Reponame.git

回声"Cloning completed."