Release and Hotfix procedures - tchapgouv/tchap-android GitHub Wiki
For the release versions of Tchap-Android, we use git-flow.
/!\ Before starting any procedure, be sure to always be up to date in your local git repository with develop and main branches.
Release
- Using git-flow, 
starta new releasetchap_vX.Y.Zand push the new branchrelease/tchap_vX.Y.Zto origin. - If necessary, add a commit to change the version number of Tchap-Android in 
build.gradleandtowncrier.toml. - Generate and commit the changelog by running 
towncrier build. - Create a new PR from the release branch against 
main. - Once approved, DO NOT MERGE THE PR.
 Finishthe release git-flow LOCALLY and DO NOT REMOVE the hotfix branch, do not push anything to origin for the moment.- Verify that 
mainanddevelopbranches have been correctly updating by the git-flow (release branch merged into main, main merged into develop). 
/!\ To continue, you must have the right to push on develop and main to finish the git-flow process.
- If there is no error, add a tag 
tchap_vX.Y.Zon the merge commit against main, push thetag,mainanddevelopbranches to origin. - The release PR on Github should have been automatically merged and the release branch deleted (no action needed from your side).
 - You can now create the release or pre-release on GitHub and copy past the changelog.
 
Hotfix
- Using git-flow, 
starta new hotfixtchap_vX.Y.Zand push the new branchhotfix/tchap_vX.Y.Zto origin. - Add a commit to increment the minor version number (
Z) of Tchap-Android inbuild.gradleandtowncrier.toml. - Cherry-pick the potential commits already merged in develop that you want for the hotfix.
 - Create a PR against this hotfix branch for each new bugfix related to the hotfix. Merge them once approved.
 - When the hotfix is ready, generate and commit the changelog by running 
towncrier build. - Create a new PR from the hotfix branch against 
main. - Once approved, DO NOT MERGE THE PR.
 Finishthe git-flow LOCALLY and DO NOT REMOVE the hotfix branch, do not push anything to origin for the moment.- Verify that 
mainanddevelopbranches have been correctly updating by the git-flow (hotifx branch merged into main, main merged into develop). 
/!\ To continue, you must have the right to push on develop and main to finish the git-flow process.
- If there is no error, add a tag 
tchap_vX.Y.Zon the merge commit against main, push the tag, the main branch and develop to origin. - The hotfix PR on Github should be automatically merged and the hotfix branch deleted.
 - You can now create the version on GitHub and copy past the changelog.