-
Notifications
You must be signed in to change notification settings - Fork 0
Updates and releases
Moodle updates it's core every half year and all Learnweb plugins have the goal to support it. Updating our plugins is a and very important process and should be done carefully. As the steps are quite repetitive for every update, this checklist helps you adapting plugins and releasing a qualitative new version of a plugin.
-
Read the release notes and developer updates for the new moodle version. Are there deprecated classes/functions that the plugins uses? Did the structure of core classes change that could effect my code? Check these changes and adapt your code if needed. This is the most important step! Take it very serious, as otherwise errors will occur and your plugin can not support the new version!!!
1.1. Check if the UI of moodle had updates. The UI is based on bootstrap. Sometimes new moodle version change the bootstrap version. Adapt your mustache templates if needed.
-
If you have a local moodle instance, upgrade the core to new version. Then run all your PhpUnit- and Behat-tests. They should run without errors. Check in PhpUnit for deprecations (they appear in the cli if you run the tests at the end of the tests).
2.1 Indepently if you have automated testing, go to your local moodle instance and click yourself through different use cases. Especially rare use cases and use cases that could provoce errors.
-
If you have the
local/codecheckerplugins installed (which you should!), update it to the newest version and let it run. Adapt your code to the newest code.
Now your plugins is almost good to go. Now you can start the release process below.
Wether you adapted your code to a new Moodle version or your plugin had many new features/changes, with releases a plugin declares a new stable version of itself.
For learnweb plugins we have the following rule for releases:
- Major releases always orientate on the newest Moodle version it supports (e.g. for Moodle 5.1 the release tag is v5.1-r1). Theses are the releases that adapt the plugin to the new Moodle version.
- Minor releases that happen between major releases increase the release number of the major release (e.g. v5.1-r2, v5.1-r3...). Use minor releases for important bugfixes or features that can not wait for the next mejor release.
Every release follow the same steps. Follow the checklist below when releasing a new version.
- Write the changes since the last Release (from pull request, etc.) in the
CHANGES.md. You don't have to write every change, but the most relevant ones for administrators and users (e.g. bugfixes, new features, UI changes). - Update your
version.php:-
$plugin->version=> if a major release:xxxxxxxx00(x ist the current date). On minor releases only increment the last 2 digits -
$plugin->requires=> the version number of the minimum moodle version the plugin supports -
$plugin->supported=> array of versions the plugins support[from, until] -
$plugin->release=> the new release numbervX.X-rX
-
- After merging the update pull request to main, create a
tagwith the release number. This tag is important as it sets the release commit.