Skip to content

Versioning & Update manager

Robin Meis edited this page Jul 14, 2014 · 2 revisions

Structure of the update protocol

Since version 1.1.0 SiriAPI offers an automated update manager. The update manager uses the official GitHub release manager API (v3). Any release which is created with the release system is also shown as update on chat style based responses of SiriAPI.

Basically it is checked if the latest version differs from the installed version. It is differentiated if a release is marked as pre or as stable one. Available updates are displayed based on the release channel (beta or stable).

But it is also possible that API changes cause incompatibility with earlier versions which could not be upgraded automatically. In this case the available update is shown but can't be installed automatically. Incompatible updates are only shown if the last compatible update is installed.

To pass the compatibility information to the update manager of SiriAPI without using a server apart from GitHub I decided to add a tag to each released version in its description:

compatible:bool

The compatibility information is stored in the first line of the description. If it can't be found, the update is not displayed by the update manager.

When the user starts the update, the releases .zip file is downloaded from GitHub and extracted by the standard zipfile library of Python. After extracting it to directory temp, the directory SiriAPI gets deleted and replaces with the SiriAPI folder of temp. After that the temp directory is removed and SiriAPI gets restarted.

Implementation & Testing

For testing purposes I created a test repository where I uploaded some dummy text files with unimportant information to keep the versioning of SiriAPI clean. More information will follow soon...