We wrote our own auto-update framework knowing:
- The code freeze is done with PyInstaller;
- The GNU/Linux binary uses AppImageTool commands to generate a
- The macOS installer uses OS-specific commands to generate a
- The Windows installer uses the Inno Setup Compiler that outputs a single
HTTPSaccess only is strongly recommended.
The server side tree is quite simple:
drive-updates/ alpha/ nuxeo-drive-188.8.131.52-x86_64.AppImage nuxeo-drive-184.108.40.206.dmg nuxeo-drive-220.127.116.11.exe beta/ nuxeo-drive-3.1.1-x86_64.AppImage nuxeo-drive-3.1.1.dmg nuxeo-drive-3.1.1.exe release/ nuxeo-drive-3.1.0-x86_64.AppImage nuxeo-drive-3.1.0.dmg nuxeo-drive-3.1.0.exe nuxeo-drive.dmg nuxeo-drive.exe versions.yml
alpha: early development versions. It can be promoted to beta, in that case files are just moved from this folder to the
beta: all betas that are not releases. If one beta is going to be officially released, files are just moved from this folder to the
release: all official releases.
nuxeo-drive-x86_64.AppImage: symbolic link to the latest official release for GNU/Linux;
nuxeo-drive.dmg: symbolic link to the latest official release for macOS;
nuxeo-drive.exe: symbolic link to the latest official release for Windows;
versions.yml: list of available versions and their characteristics (the format used is YAML).
2.0.0: min: '5.6' max: 7.10-HF18 type: alpha checksum: also: SHA1 appimage: ... dmg: ... exe: ... 3.1.0: min: '7.10' type: release checksum: algo: SHA512 appimage: ... dmg: ... exe: ... 3.1.1: min: '7.10' type: beta checksum: algo: MD5 appimage: ... dmg: ... exe: ... 4.0.0: min: '7.10' type: beta checksum: algo: MD5 appimage: ... dmg: ... exe: ...
Each entry describes a version with:
type: the release type, either an
checksum: list of checksums for related files. Mandatory.
algo: the algorithm used, it must be one of the hashlib module (will use SHA256 by default).
appimage: the checksum of the file
.AppImage. Mandatory if you provide a GNU/Linux binary.
dmg: the checksum of the file
.dmg. Mandatory if you provide a macOS installer.
exe: the checksum of the file
.exe. Mandatory if you provide a Windows installer.
min: the minimum Nuxeo version required for this release to work with. Mandatory.
max: the maximum Nuxeo version required for this release to work with. If not defined, Drive will consider the current Nuxeo version as acceptable to work with.
max can take a hotfix (HF) version, helpful to isolate some versions. Defined versions are inclusive.
- A version not listed can physically exist on the server but the reverse is not true: if a version is listed, files must exist on the server.
- Versions set are not effective. They are listed for information only as there is no way to retrieve the exact server version at the time.
When setting the
beta-update-site-url parameter, it must point to
- You do not specify
/releaseat the end of the URL, Drive will compute the final URL depending on set options;
- Of course, if you are using a specific domain name where the tree is at the root, use only
- The trailing slash is not mandatory.
- Fetch the file
versions.ymlfrom the defined URL in
- Find the latest version sorted by
typeand the current Nuxeo version;
- If the "Auto-update" option is not checked, stop there;
- Download the version specific to the current OS (
.exefor Windows, ... ) into a temporary folder;
- Verify the checksum of the downloaded file.
Then, actions taken are OS-specific.
The process is quite simple:
- Move the new
nuxeo-drive-x.y.z-x86_64.AppImagefile next to the current running AppImage file;
- Restart Drive using the new executable.
- Mount the
- Backup the current
- Copy the new
- Unmount the
- Delete the
- Restart Drive.
The only action to do is to install the new version by calling
nuxeo-drive-x.y.z.exe /VERYSILENT /START=auto from the temporary folder.
The installer will automagically:
- Stop Drive;
- Install the new version, it will upgrade the old one without personal data loss;
- Start Drive.