How do you manage the generated source code files in your repositories and deployment procedures using Git (PHP, Python, etc.)?
For example, I have a repository named “interfaces” with Thrift definitions. They can be converted to Python, PHP, JS, etc. Skeletons / stubs. Other projects in different languages, each in their own repository, want to use these stubs. How to deliver stubs to projects?
I see only two ways:
Create stub files and save them in the “interfaces” repository, and this repository should be attached to the projects (as soon as for the submodule or in any other way). But this method introduces a lot of headaches when checking for interface updates and stubs due to the complex concepts of "git subodules".
Attach a clean "interface" repository to each project and create stub files as temporary git -ignorable (!) Files (using "make stubs" or similar). Thus, each project can have its own generation settings using its own patches (if necessary at all). But you need to introduce some compilation commands into the PHP / Python development and production environment (and not just git pull).
What are the pros and cons of these approaches?
source share