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 [[https://cdash.mitk.org/index.php?project=MITK|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 without the `🡨 Previous changelog • Next changelog 🡪` navigation helpers at the top and bottom, but prepended by the **Merge commit preamble** snippet below ([[https://github.com/MITK/MITK/commit/202a4bcb66b70182b06fcef1dcbd1f3e334b9b88|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
# Push the master branch including the snapshot tag
# `git push && 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 [[mitk/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
# Update the **Next changelog** links at the top and (!) bottom of the previous changelog
# For the current changelog, the **Next changelog** link should point to itself until another changelog is published
# Close the release task as `Resolved`
---
```name="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>
```
```name="Snapshot tag message"
2020 Week 39 (Late September)
https://phabricator.mitk.org/w/mitk/changelog/2020.39/
```