From da5181f057c4693a3308ab44c55fca59ee78f65a Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 24 Feb 2024 02:07:53 +0100 Subject: [PATCH] Add autoupdate.version_regex to the doc original commit: https://github.com/YunoHost/doc/pull/2408/commits/93793fef44044ec7e5592c8bc8ad825ef32b7aaa --- src/utils/resources.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/utils/resources.py b/src/utils/resources.py index fa4ae2d39..166be46f2 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -350,6 +350,15 @@ class SourcesResource(AppResource): It is also possible to define `autoupdate.upstream` to use a different Git repository instead of the code repository from the upstream section of the manifest. This can be useful when, for example, the app uses other assets such as plugin from a different repository. + If the upstream project provides non-standard tag or release names, you can fix this, with a regex with a matching group. + For example, if tags look like `release-v4.1`, put: + + ```toml + autoupdate.version_regex = "^release-v(.*)$" + ``` + + And the autoupdater will use the matched group (here: `4.1`) as the version. + ##### Provision/Update - For elements with `prefetch = true`, will download the asset (for the appropriate architecture) and store them in `/var/cache/yunohost/download/$app/$source_id`, to be later picked up by `ynh_setup_source`. (NB: this only happens during install and upgrade, not restore)