我正在开发一个与CruiseControl.NET一起使用的构建自动化工具。 在我的ccnet.config配置文件中,我有以下的sourcecontrol标签:
<sourcecontrol type="git">
<repository>sourceControlAddress</repository>
<branch>release-0.9.19</branch>
<autoGetSource>true</autoGetSource>
<fetchSubmodules>true</fetchSubmodules>
<executable>C:\Program Files (x86)\Git\cmd\git.exe</executable>
<tagOnSuccess>false</tagOnSuccess>
<commitBuildModifications>false</commitBuildModifications>
<commitUntrackedFiles>false</commitUntrackedFiles>
<tagCommitMessage>Build {0}</tagCommitMessage>
<tagNameFormat>Build-{0}</tagNameFormat>
<committerName>Build</committerName>
<committerEMail>build@build.com</committerEMail>
<workingDirectory>d:\GIT\Sources\WEB</workingDirectory>
<timeout>60000</timeout>
</sourcecontrol>
我目前唯一的问题是它“擦除”了我所有的结帐信息。 例如:如果我在Git扩展中打开解决方案,并选择一个分支运行自动化构建,然后再次打开Git扩展,我将看到一个“没有分支”,而不是我选择的分支。 这会引起问题,特别是当我尝试在我的构建脚本中检入内容时,因为我会收到一条消息:“当前没有任何分支”。
如何设置要使用和签出的分支? (branch属性具有正确的分支名称,autoGetSource设置为true)
谢谢!
编辑:我在控制台中运行了CC.net并得到了这些信息:
[Git] 调用git checkout -q -f origin/release-0.9.19
正在正确调用签出操作。但是,由于某种原因,在运行时它被“清除”了。 也许是因为
[Git] 调用git clean -d -f -x
?