TeamCity - 保持Git子模块最新? [英] TeamCity - keeping Git submodule up to date?

查看:570
本文介绍了TeamCity - 保持Git子模块最新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含子模块的Git存储库。



此存储库在TeamCity中有各种构建配置,这些配置依赖于子模块上的代码。有没有一种方法与TeamCity检测到子模块存储库已更新,然后继续更新子模块,更新父存储库指向最新的子模块并构建代码?


$ b $

解决方案

我想自动查找子模块上的提交是否会破坏父存储库。该步骤将从父回购检查子模块是否具有任何修改的文件。



请参阅 Git告诉我我的子项目是脏的,这是什么意思?作为例子。



确保子模块未配置父代仓库以忽略内部更改:


I have a Git repository that includes a submodule.

This repository has various build configurations in TeamCity that are dependent on code on the submodule. Is there a way with TeamCity to detect that the submodule repository has been updated and then go ahead and update the submodule, update the parent repository to point to the latest submodule and build the code?

I want to automate finding out if a commit on the submodule will break the parent repository.

解决方案

You could add a step which will check, from the parent repo, if a submodule has any modified file.

See "Git tells me my subproject is dirty, what does this mean?" as an example.

Make sure that submodule isn't configure ion your parent repo to ignore internal changes: "Git: can I suppress listing of 'modified content'/dirty submodule entries in status, diff, etc?".

这篇关于TeamCity - 保持Git子模块最新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆