Metainformationen zur Seite

Plugin AutoUpdate function for plugins

Example configuration of your plugin.cfg:

[AUTOUPDATE]
AUTOMATIC_UPDATES=true
RELEASECFG=https://raw.githubusercontent.com/christianTF/LoxBerry-Plugin-MQTT-Gateway/master/release.cfg
PRERELEASECFG=https://raw.githubusercontent.com/christianTF/LoxBerry-Plugin-MQTT-Gateway/master/prerelease.cfg


Example configuration of a release.cfg (prerelease.cfg uses the same syntax):

[AUTOUPDATE]
# Version of the new release
VERSION=0.7.1
 
# Download URL of the ZIP Archive
ARCHIVEURL=https://github.com/christianTF/LoxBerry-Plugin-MQTT-Gateway/archive/0.7.1.zip
 
# URL for further information about this release
INFOURL=https://github.com/christianTF/LoxBerry-Plugin-MQTT-Gateway/releases
  1. Save the release.cfg and prerelease.cfg into your repository (e.g. into the root directory of your plugin), so it is available via Internet for LoxBerry.
  2. The VERSION is the new version of your release/pre-release.
  3. The ARCHIVEURL in the release.cfg/prerelease.cfg must be the ZIP download url (the real zip, not a download page) of that version.
  4. Put the URLs to the release.cfg and prerelease.cfg for these files into your plugin.cfg

If you have a new release or prerelease

  1. Edit the release.cfg or prerelease.cfg file, updating
    1. the VERSION with the new number
    2. the ARCHIVEURL link with the new zip file
    3. the INFOURL if you provide a link e.g. to a What's New website (could be in LoxWiki). INFOURL is optional.


How LoxBerry processes the scheduled Plugin AutoUpdate :

  1. On installation, LoxBerry stores the RELEASECFG and PRERELEASECFG link from the plugin.cfg in the local Plugin database.
  2. If the user has enabled Automatic Update for your plugin to "Release" or "Prerelease", or "Notify" about new versions, LoxBerry downloads the release.cfg and prerelease.cfg with the given url's.
  3. It parses the downloaded release.cfg and prerelease.cfg for the version number.
  4. If the version number is higher than the current installed version number, it downloads the zip from the url in release.cfg/prerelease.cfg. (or, if "Notify" is selected, only a notification is sent)
  5. After downloading and checking the zip, the plugin installation is triggered automatically in the background.

Therefore, a new version can always been triggered by updating the release.cfg and prerelease.cfg that is hosted in your repository.