First, develop some feature in a branch, open a merge request. After it’s been reviewed and merged into develop:
git checkout master
git pull
git checkout develop
git pull
So that the two synchronization branches are up to date.
Now we have to choose a release tag according to the following rule : a small change that does not change the API increases the patch version, a big change or an API change increases the minor version.
git flow release start X.Y.Z
Now we edit two files in the root directory:
- CMakeLists.txt : write the new minor and patch versions at lines containing VERSION_MINOR and VERSION_PATCH.
- CHANGES.md (in some modules called CHANGELOG.md) : document all the changes from the previous release.
Finally:
git commit CHANGES.md CMakeLists.txt
git flow release finish X.Y.Z
git push --follow-tags
git checkout master
git push