From 1dd511b362cd70a03d0c2c63856a847cb347f1d5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 09:54:47 +0000 Subject: [PATCH] Address PR review comments and hardcode updater channel to stable Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/c40941ff-2bf8-4a57-82be-2a0bd22b19a2 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- Containers/nextcloud/config/aio.config.php | 1 + Containers/nextcloud/entrypoint.sh | 2 ++ Containers/nextcloud/upgrade-latest-major.sh | 2 -- php/src/Controller/DockerController.php | 9 +++------ 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Containers/nextcloud/config/aio.config.php b/Containers/nextcloud/config/aio.config.php index 7c80b6ba..497b2cf0 100644 --- a/Containers/nextcloud/config/aio.config.php +++ b/Containers/nextcloud/config/aio.config.php @@ -2,4 +2,5 @@ $CONFIG = array ( 'one-click-instance' => true, 'one-click-instance.user-limit' => 100, + 'update_channel' => 'stable', ); diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 530e90e6..282c76a1 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -405,6 +405,8 @@ EOF echo "Upgrade to latest major version failed! Check the output above for details." exit 1 fi + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" fi # AIO update to latest end # Do not remove or change this line! diff --git a/Containers/nextcloud/upgrade-latest-major.sh b/Containers/nextcloud/upgrade-latest-major.sh index 3729e2a4..20fceb89 100644 --- a/Containers/nextcloud/upgrade-latest-major.sh +++ b/Containers/nextcloud/upgrade-latest-major.sh @@ -30,8 +30,6 @@ if ! [ "$INSTALLED_MAJOR" -gt "$IMAGE_MAJOR" ]; then touch "$NEXTCLOUD_DATA_DIR/install.failed" exit 1 fi - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" fi php /var/www/html/occ config:system:set updatechecker --type=bool --value=true php /var/www/html/occ app:enable nextcloud-aio --force diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index f515dd3c..441caef7 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -14,10 +14,7 @@ use Slim\Psr7\NonBufferedBody; readonly class DockerController { private const string TOP_CONTAINER = 'nextcloud-aio-apache'; - - private function getLatestMajorVersion(): string { - return '33'; - } + private const string LATEST_MAJOR_VERSION = '33'; public function __construct( private DockerActionManager $dockerActionManager, @@ -225,7 +222,7 @@ readonly class DockerController { } if (isset($request->getParsedBody()['install_latest_major'])) { - $installLatestMajor = $this->getLatestMajorVersion(); + $installLatestMajor = self::LATEST_MAJOR_VERSION; } else { $installLatestMajor = ''; } @@ -333,7 +330,7 @@ readonly class DockerController { } public function RunNextcloudUpgradeToLatestMajor(Request $request, Response $response, array $args) : Response { - $this->configurationManager->installLatestMajor = $this->getLatestMajorVersion(); + $this->configurationManager->installLatestMajor = self::LATEST_MAJOR_VERSION; // Get streaming response start and closure $nonbufResp = $this->startStreamingResponse($response);