4

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.

RyanW
  • 5,067
  • 3
  • 41
  • 57

1 Answers1

0

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?".

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283