Merging into master Branch
Merging into master Branch
About every two to four weeks we strive for a merge into the master branch, following the release approach of git-flow. The merges are tagged and accompanied by change logs. We follow a strict protocol for master merges:
- Determine the name of the merge
- Look up the current week number (ISO-8601): https://www.epochconverter.com/weeknumbers
- Look up the weeks of the current month and choose the best fitting description:
- Very Early <Month>
- Early <Month>
- Mid <Month>
- Late <Month>
- Very Late <Month>
- The naming scheme is <Year> Week <Week> (<Description>)
- For the rest of this protocol, we exemplarily use 2020 Week 39 (Late September)
- For now, create an empty Phriction page for the changelog
- The URI scheme is https://phabricator.mitk.org/w/mitk/changelog/2020.39/
- The title is 2020 Week 39 (Late September)
- Create (and assign) an MITK task for the merge
- The title is 2020 Week 39 (Late September)
- The description is a link to the changelog in Remarkup format: [[mitk/changelog/2020.39]]
- Create a release branch
- For all following git actions you must be a member of the MITK Elevated Branching Privileges group
- Look up CDash to identify the most recent green commit in the develop branch
- Create and checkout release branch: git checkout -b release/T<n>-2020-Week-39 <commit>
- Push release branch: git push -u origin release/T<n>-2020-Week-39
- The push will execute a git hook that writes a table into the task containing all merge commits, associated tasks and revisions (Phabricator Differentials) since the last master merge
- Write the changelog
- Use the generated table in the task mentioned above to write the changelog in Phriction
- Use earlier changelogs as template
- Merge the release branch
- Merge the release branch into the master branch
- Change the commit message to the remarkup formatted changelog text prepended by the Merge commit preamble snippet below (Example on GitHub)
- Eventually merge it into the master branch: git checkout master && git merge --no-ff release/T<n>-2020-Week-39
- Tag the merge commit with the current date
- git tag -a snapshots/2020-09-25
- See the Snapshot tag message snippet below for the two-line tag message
- Merge the release branch into the master branch
- Push the master branch including the snapshot tag
- git push --tags
- Merge the master merge commit back into the develop branch
- Instead of merging the release branch back into the develop branch, merge the master merge commit back into the develop branch to make the snapshot tag available there as well
- git checkout develop && git pull && git merge --no-ff master && git push
- Delete the remote release branch
- git push origin --delete release/T<n>-2020-Week-39
- Add the latest changelog to the Changelog page
- Move the previous changelog to the top of the list in the Past changes section
- Set the latest changelog in the Recent changes section
- Close the release task as Resolved
Merge commit preamble
2020 Week 39 (Late September) The following - possibly updated - changelog can be viewed as formatted article at https://phabricator.mitk.org/w/mitk/changelog/2020.39/. <insert changelog here>
Snapshot tag message
2020 Week 39 (Late September) https://phabricator.mitk.org/w/mitk/changelog/2020.39/
Tags
None
Referenced Files
None
Subscribers
None
Tokens
- Last Author
- kislinsk
- Last Edited
- Oct 28 2020, 7:50 AM