[wp-hackers] GitHub submodule theme development?
Harry Metcalfe
harry at dxw.com
Mon Jul 8 18:58:49 UTC 2013
> How to do you test/develop those submodules (or, are they other
> people's code that you're just linking to ... i.e you don't modify
> directly)?
Yup, the latter. As soon as we need to modify something, it goes into a
separate repo just for the project. As a rule, if we're going to apply
upstream updates, we use a submodule. For repos which contain local
modifications it allows us to easily make sure we don't overwrite one of
our changes, and to resolve any conflicts. For ones that don't, we have
a script that downloads the newer plugin version, unzips it, commits it,
and tags it with the version. This makes updating it everywhere really
easy, because we can just update the submodule to the new tag for each
site, commit wp-content, and push to the production branch which
auto-deploys.
> If you have the time to go into some details, I'm really curious to
> hear more about how you develop themes locally and then push/pull
> to/from remote/local.
Well, the theme usually just lives in the wp-content repo. Sometimes
we'll have one of the default themes as a submodule, if it's a parent theme.
I'm not sure what more there is to add here -- did you have something
specific in mind? Other than the production branch which we use for
deploys, it's all fairly normal.
> That makes sense. Do you have any publicly viewable repos that have
> this type of setup? Just curious (I think I follow your setup, but I'd
> love to have a visual too). :-}
I'm afraid I don't think we do. We have a theme available:
https://github.com/dxw/govuk-blogs/
Which shows how grunt is set up, and how we submodule roots and
bootstrap into themes. That repo is then a submodule in a wp-content
repo which also has a few plugins submoduled. The site is here:
http://blog.gov.uk
> Oh, that's interesting. Thanks for tip/link, I'll check it out. :)
Let me know how you get on :)
> +1 for grunt.
>
> Thanks for details! I really appreciate it. :)
Welcome!
Harry
More information about the wp-hackers
mailing list