Hallo all,
I write here to have some suggestions on how to manage with git the different versions of the Example42 modules.
Some of the topics here are related to the '
StdMod: Git, Branching, Versioning, Backwards Compatibility, Repos' thread but I prefer to open a new thread, strictly related on how future Example42 git repos are going to be organised, that can remain for future reference: various things are changing and some confusion may arise.
I've just made some commits on GitHub with on these "collection" repos (the ones that link different Puppet modules as git submodules):
https://github.com/example42/puppet-modules - Is the main modules repo, I've just removed all the "old" 1.x modules (I'd not suggest them to anyone now) and the intention is to gather here as submodules both 2.x and 3.x modules pointing always to the master branch and so (read later) switching from 2.x to 3.x when a module is ready
As written in the mentioned thread we may have different collections where different authors link modules at different commits and manage test and code status at their own will.
These are the "containers" or "collection" repos, which are more or less a set of submodules to different modules at different branches/commits.
To organise the development in a more controlled way and to manage 2.x and 3.x versions I'm considering this approach for each individual module:
- Have master pointing always to the latest "stable" version of the module (
https://github.com/example42/puppet-modules will point to master branches, and therefore switch from time to time from 2. to 3.x)
- Eventually introduce a devel branch where to test commits that have to be merged on master
I'm not a git ninja and not an experienced and disciplined developer so I'm bit worried at the idea of managing correctly branches and keeping them aligned.
In particular I wonder if there's a sane way, with hooks or whatever, to keep bidirectionally synced the master branch with the "currently active" release branch.
The rationale is that I have a 2.x only module and want master to be synced always to branch 2
Then I can start to work on 3 and when I think it's ready I want master to be synced to branch 3
This syncing should be bidirectional: commits to master should be merged in the currently "active" branch, for example 2, and commits to branch 2, if it's active, should be merged automatically on master.
When I want to switch master to 3 and start syncing commits from master to 3 and vice versa I should just edit/touch a single file/thing.
Does this approach make sense for you?
Would it make sense and be usable for end users?
Do you have some hooks/samples/suggestions on how to do that?
Should this be done via GitHub, in git local repos or both?
Any suggestion or comment definitively welcomed
al