How to update an existing addon¶
- set it up in a project as if you were creating one, in the addons-devdirectory
- make and test your changes
Ideally, select a project that already works with an existing version of the addon. This way, you can checkthat the new version continues to work as expected, and that migrations for example run correctly.
If you don’t have such a project, the next best thing is to create a new project on the Control Panelcontaining the addon, and then set that up locally.
Uninstall the addon locally if necessary¶
You will find the addon listed in - remove it from there, so that when you build thelocal container it will no longer try to install the old version.
Remove it from each of these places.
You will also find it listed in INSTALLEDADDONS
in settings.py
- _leave it there.
Clone the addon repository to addons-dev¶
In , clone the addon from its VCS repository. It should look something like this:
Check that you have the appropriate version cloned.
If the new version is different from the previously installed version and includes changed dependencies, oryou want to check exactly what it will do when when the project is built, you should run:
This processes the addon, adding:
to the requirements.in
.
You will need to run this again if you make any changes in the addon that involve dependencies orinstallation of components.
Work on the code¶
Restart the runserver (), and check that the addon continues to work asexpected (or fails to work, if that is what previously happened).
Make and test any changes you want to make.
Push your changes¶
When you’re satisfied, you’re ready to update the addon.
When you have finished all your updates, commit and push your changes to the addon’s repository (ormake a pull request if it’s not your own).
Remember that if your addon is a wrapper for installing a reusable application,its version number should track the version number of the application, in an additional dottedincrement - for example, the addon version 1.5.4.2
tracking application version should become 1.5.4.3
.
Finally, in the addon directory, run:
to check it, and:
to push it to the addons system.
Test it on the Control Panel¶
For completeness, check that the new version of your addon can be installed and deployed in aproject.
Place the new version in the appropriate channel¶
By default, your newly-uploaded addon version will be placed in the Alpha channel. In the _Addons_section of the Control Panel, put it in the Beta or Stable channels if appropriate.