1

I have a project with many plugins and for now I keep them all in one git repository, because they consist of one file each:

plugins
+-- A
+-- B
+-- C
+-- D
+-- E

I want to deploy this software to different production systems and all of them should get different combinations of plugins. Let's say, A, B, D, C, E and B, C, D. If I change a plugin upstream, I want to update it as easy as possible on all production systems. Is there something like a .gitignore file for "do not check this files out!"? Or how can I do it without creating an own git repository for each file?

Florian
  • 3,145
  • 1
  • 27
  • 38

1 Answers1

1

It would seem easier to isolate the deployment mechanism in a script able to deploy the right script for the right environment.

If you keep using Git on production (which isn't always ideal), then that same script could be activated automatically on checkout for each plugin, and would determine (again dependent on the deployment environment that it somehow detects) where to copy that file or not.

This is called a content filter driver, but it could not prevent those files to appear in <yourGitRepo/plugins>: your deployment environment should expect to find your plugin in some other place (other than the git repo itself), in order to give a chance to your script (activated automatically on the git repo checkout) to copy only the relevant plugins.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250