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:
parent
f41504c852
commit
53e79a72d7
25 changed files with 1146 additions and 61 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue