since I adopted an Agile development method I find myself to release source code more frequently. This also involved more repeated tasks, that done by hand do not result so… “agile”.
I do have 2 permanent branches: master (stable software), develop (development version), and all other branches for each feature, that will merge in develop.
To be more specific the release process (develop->master) involves the following steps (let’s assume we’re releasing a 1.0.5 version):
First I do create a new branch, where I can do little customizations release-specific
git checkout -b release1.0.5 develop
Then (in this case) I edit the revision partial view -in a rails app- (used to show the rev # on the application footer)
vim app/views/layouts/_revision.html.haml
Then I commit changes on release1.0.5 (usually with the message “updated rev #”), checkout master, git merge --no-ff release1.0.5, git tag v1.0.5, upload sources to production, git checkout develop, git merge --no-ff release1.0.5 and finally git branch -d release1.0.5.
This is incredibily tedious when done 3/4 times a day (maybe to hard fix a bug recognized only on the production server). Of course it would be great to have a command such-as “make-release” to do all this automagically, maybe taking the release number as parameter.
I’ve already read about custom git commands, but you know, it’s project specific (on another project I could not need to perform such operations), so it would be great to have the command related to the current repository, avoiding to come up with tons of commands, one for each project shared globally. Is there a way to do it?
git flowsounds like a good match for you.