Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - Find which apps in repo have changed

I have a very large repository that contains many apps/services. For example there are windows services written in C#, a JS/HTML web client, node apps, and other apps.

I want to programmatically find which of these need to be deployed when I tag a new release, based on the diff with the previous tag.

For some apps it is as simple as checking for changes in a subfolder of the repo. For example, the web client is all in src/clients/web. But the C# services use some shared C# libraries, which are not in the folder for those services. These dependencies can change over time, so I can only really rely on references in the csproj files.

Is there a general (or partial) solution for this problem?

like image 380
JamesFaix Avatar asked Nov 06 '22 15:11

JamesFaix


1 Answers

A more general solution to that problem would be to use:

  • one Git repository per program/library/module
  • one parent repository referencing those repos as submodules

That way, when you put a new tag to the parent repository, you can:

  • first do a git submodule update -remote to ensure you have the laster (master) of all submodules
  • recompile/test to ensure this is the right state you want to tag
  • do a git diff with the previous tag to see immediately which sub-repository has changed.
like image 114
VonC Avatar answered Nov 15 '22 06:11

VonC