eZ Community » Forums » Developer » Structuring a Git code library &...

Structuring a Git code library & integrating ezp projects

Structuring a Git code library & integrating ezp projects

Saturday 22 October 2011 4:55:05 am - 2 replies

It's been a while since eZ Systems switched to hosting eZ Publish and certified extensions on Git.  After trawling the interwebs for an answer, I'm wondering how ezp developers are setting up their code repositories for projects and libraries, whilst drawing on these GitHub repos.  

SVN code libraries tend to be monolithic, whereas Git ones seem to be broken down into individual repos for components.

So how to put this all together and put together a Git project which pulls in various code libraries extensions etc?

There seems to be 2 solutions:

  1. Submodules - only allows inclusion of entire project, so hopeless for ezp extensions which have a build system, but potentially good for structuring a code library or individual git repos?
  2. Subtree merge - using merge & read tree on remotes, which would probably work at a web project level

I'm only a Git beginner, but I want to get this right to maximise code re-use.  Any experienced hands out there who can offer some advice?

Cheers in advance,

Saturday 22 October 2011 6:47:39 pm

Not sure if it is something for you, but my own development setup is like this:

  • www: clone of eZ Publish
  • svn: svn checkouts of extension that are not on git yet
  • git:  git clone of extensions from git

then using symbolic links to link in the correct paths of extensions I need in that project under www/extension/.
I also previously had a couple of shell scripts for pulling in changes on all + checking status on all, but they where a bit rough around the edges.

Slightly off topic: I have also recently set up my web server as git server and added that as remote, and by using a post-receive hook that checkouts the code with a specific branch to nginx www folder I'm thus able to just push changes locally to my server (transparently over ssh) using said remote and branch.


Hope this gives some ideas, otherwise there is lots of different blog post online on different git setups.

Modified on Saturday 22 October 2011 6:48:30 pm by André R

Saturday 22 October 2011 10:33:28 pm

Thanks for sharing André.  The setup you've got sounds fine for individual dev - would this work for a team?  (possibly, if well-documented).

In my ideal world, I could point a developer at a repo for a project which they could clone and instantly have all the extensions & environmental settings they need with a minimum of symlinks or build scripts, and still maintain ties to the origin repos.

For extensions with build scripts, cloning isn't an option unless you're happy to build them, in which case you could create a repo from the packaged tags.

I'm after a minimum of complexity, for myself and others.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from