I’m giving here a few details about the first step towards the GitHub integration. It’s now possible to push the generated code to your GitHub repository. Getting an archive was sufficient to make you discover the generators but as GenMyModel is now regularly used in many projects, a connection with a SCM was necessary. We naturally choosed Git and especially GitHub to shrug off the permission management.
In practice, GenMyModel does the following :
– Pull to get your files
– Set a tag with the full date
– Generate (over the existing files) without deleting anything
– Push all the stuff
It’s as easy as a beer after work :
1) Add “genmymodel” as a collaborator to your repository
In GitHub, choose your repository and go to “Settings” > “Collaborators” and add genmymodel :
2) Popup the generation window from the “Tools” menu:
or in case you feel bad using the menu, the right-click does the trick :
3) Fill the configuration, choose “GitHub” paste your repository root URL :
> Warning: Set your full URL with the “.git” suffix.
What we still have to do:
– Enhance our generators to keep non-generated code (round trip feature)
– Add branches to avoid setting the root repository url