ERM Backend modules release procedure
Github
- Firstly, create a branch for the version you are about to release from master, ie `release/3.0.x`.
- If releasing a bugfix/hotfix, then create branch from relevant version tag: `git checkout -b release_3.0.1 v3.0.0`
- Then cherry pick relevant commits into the release branch: `git cherry-pick <commit hash>` and check they still pass integration tests.
- Update the LICENSE date range to include current year (For example if the copyright range is 2020-2023 and it's 2024, update to 2020-2024)
- Then update the changelog `NEWS.md` file to reflect all JIRA issues solved since the previous release.
- Make sure to remove (IN PROGRESS) from relevant section, and replace with today's date.
- Also ensure you remove `-SNAPSHOT` from the version number if it was there previously (in gradle.properties)
- The okapiInterfaceVersion should already be at least a minor bump from the previous okapiInterfaceVersion
An easy way is to go to this page and filter by date updated/component. Also check the commits for the module to see if any other issues are referenced there.
When you have a parent issue and subtasks, they should appear in the changelog in a nested form, like so:
Changelog example
* ERM-904 Update tooling and framework
* ERM-906 Update licenses to Grails 4
* ERM-909 Update docker image to Java 11
- Commit changelog changes and push up to github
- If doing a bugfix, first increment version number by 1 on patch, ie 3.0.0 -> 3.0.1, then raise a PR and merge to long life release branch, ie release_v3.0.x.
- DO NOT MERGE BACK TO MASTER
- Go to your branch on github, select "releases" on the left hand side and "draft new release". Make sure the Target is set to your release branch, and the tag is of the form `vx.y.z`, ie `v3.0.0` or `v5.2.1` etc. Give the release a name, `Version 3.0.0` and fill in the explanation with the changes you already made to the changelog, along with the header:
Release information
## 3.0.0 2020-10-14
* ERM-1046 Non-phrase searching support for licenses
* ERM-967 Add "Note" to Organisation link in Licenses
* ERM-904 Update tooling and framework
* ERM-906 Update licenses to Grails 4
* ERM-909 Update docker image to Java 11
* ERM-828 Add support for "Alternative name" for licenses
* ERM-975 Licenses: Use /organizations/ instead of /organizations-storage/
* ERM-742 Custom properties: Backend validation not working
for example. Then click "publish release".
- Raise a PR and merge into master (Ensure release JIRA issue is in PR)
- **DON'T SQUASH MERGE**, this ensures commit hashes are preserved and your tag is valid on master too
- **Don't delete the branch afterwards.**
- DO NOT DO THIS FOR BUGFIX
- Head to the jenkins build page (you will need to log in with your github credentials):
find your new tag, and select "Build now" from the dropdown menu next to the tag name. (Alternatively select tag and then "Build now" from the menu on the left hand side of the screen)
- Once that's done, double check the release has made it here:
- Announce the release on slack channel `#releases`, with message
Slack release message
mod-licenses v3.0.0 released https://github.com/folio-org/mod-licenses/releases/tag/v3.0.0
with a link to the github tagged release page.
- Move onto JIRA release tasks
JIRA
- Change name of JIRA issue to reflect released version number
- Set to 'closed'
- Unassign whoever is currently assigned to the issue
Post release
After the release, a few things need to be done
- Create a new branch for
postRelease
- Update minor version in gradle.properties (WITH -SNAPSHOT)
- Do not do this for bugfix releases
- Update okapiInterfaceVersion minor in gradle.properties
- Do not do this for bugfix releases
- Update NEWS.md with new section for the minor release you set up above and "in progress"
- For bugfix against the latest release, instead copy the patch notes from that patch underneath any "in progress" section
- For bugfix against a previous headline release this can be ignored
- Raise PR with changes against master
- Ensure release JIRA issue is in PR.
- Squash merge to master