Duplicity: parse Gitlab releases

This commit is contained in:
Steffen Lange 2024-02-20 15:35:53 +01:00
parent 53cea337ba
commit 57058539c7

View file

@ -5,8 +5,8 @@ class Duplicity extends PatchBase {
parent::__construct('Kenneth Loafman', 'Duplicity', 'http://duplicity.gitlab.io/duplicity-web/');
}
function check() : bool {
if ($this->fetch_json('https://gitlab.com/api/v4/projects/12450835/repository/tags'))
return $this->parse_json('name', '/rel\.(.+)/');
if ($this->fetch_json('https://gitlab.com/api/v4/projects/12450835/releases'))
return $this->parse_json('tag_name', '/rel\.(.+)/');
return false;
}
}