Ajoute les mises à jour autonomes

Les installations hors YunoHost peuvent désormais vérifier et installer une release Forgejo avec sauvegarde et retour arrière complet.
This commit is contained in:
Alexandre NOEL 2026-09-08 20:13:55 +02:00
commit 53e79a72d7
25 changed files with 1146 additions and 61 deletions

View file

@ -15,6 +15,7 @@ foreach (
'Auth',
'AuditService',
'BackupService',
'UpdateService',
'NotificationService',
'PrivacyService',
]
@ -36,6 +37,9 @@ try {
if (in_array($command, ['run', 'notifications'], true)) {
$results['notifications'] = NotificationService::send(false);
}
if (in_array($command, ['run', 'updates'], true)) {
$results['updates'] = UpdateService::refreshIfDue();
}
echo json_encode(
['ok' => true, 'at' => date(DATE_ATOM), 'results' => $results],
JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE,