diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-04-30 09:43:33 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-08-07 13:51:39 +0200 |
commit | 9e962fb69f0afa12eeec3d2e412648a5e432588c (patch) | |
tree | 5277d4d9e6aebf3ad7bb18fc530507abd945a7e9 /core/Command | |
parent | a3d30bf4a23f3827103dd3ba5e10c16a58362a80 (diff) | |
download | nextcloud-server-9e962fb69f0afa12eeec3d2e412648a5e432588c.tar.gz nextcloud-server-9e962fb69f0afa12eeec3d2e412648a5e432588c.zip |
Allow to update to nightly
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/App/Disable.php | 3 | ||||
-rw-r--r-- | core/Command/App/Enable.php | 5 | ||||
-rw-r--r-- | core/Command/App/Install.php | 3 | ||||
-rw-r--r-- | core/Command/App/Remove.php | 3 | ||||
-rw-r--r-- | core/Command/App/Update.php | 11 |
5 files changed, 17 insertions, 8 deletions
diff --git a/core/Command/App/Disable.php b/core/Command/App/Disable.php index ba9b8d769e5..88b8539fb2e 100644 --- a/core/Command/App/Disable.php +++ b/core/Command/App/Disable.php @@ -78,7 +78,8 @@ class Disable extends Command implements CompletionAwareInterface { try { $this->appManager->disableApp($appId); - $output->writeln($appId . ' disabled'); + $appVersion = \OC_App::getAppVersion($appId); + $output->writeln($appId . ' ' . $appVersion . ' disabled'); } catch (\Exception $e) { $output->writeln($e->getMessage()); $this->exitCode = 2; diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php index 2e26184b199..e1605942d82 100644 --- a/core/Command/App/Enable.php +++ b/core/Command/App/Enable.php @@ -120,13 +120,14 @@ class Enable extends Command implements CompletionAwareInterface { } $installer->installApp($appId, $forceEnable); + $appVersion = \OC_App::getAppVersion($appId); if ($groupIds === []) { $this->appManager->enableApp($appId, $forceEnable); - $output->writeln($appId . ' enabled'); + $output->writeln($appId . ' ' . $appVersion . ' enabled'); } else { $this->appManager->enableAppForGroups($appId, $groupIds, $forceEnable); - $output->writeln($appId . ' enabled for groups: ' . implode(', ', $groupNames)); + $output->writeln($appId . ' ' . $appVersion . ' enabled for groups: ' . implode(', ', $groupNames)); } } catch (AppPathNotFoundException $e) { $output->writeln($appId . ' not found'); diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php index 41e3e20c9dc..898e39416f3 100644 --- a/core/Command/App/Install.php +++ b/core/Command/App/Install.php @@ -74,7 +74,8 @@ class Install extends Command { return 1; } - $output->writeln($appId . ' installed'); + $appVersion = \OC_App::getAppVersion($appId); + $output->writeln($appId . ' ' . $appVersion . ' installed'); if (!$input->getOption('keep-disabled')) { $appClass = new \OC_App(); diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php index 96d1efe8c62..1135b7b446e 100644 --- a/core/Command/App/Remove.php +++ b/core/Command/App/Remove.php @@ -124,7 +124,8 @@ class Remove extends Command implements CompletionAwareInterface { return 1; } - $output->writeln($appId . ' removed'); + $appVersion = \OC_App::getAppVersion($appId); + $output->writeln($appId . ' ' . $appVersion . ' removed'); return 0; } diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php index 34178c1ee7c..1efafc47e93 100644 --- a/core/Command/App/Update.php +++ b/core/Command/App/Update.php @@ -76,7 +76,12 @@ class Update extends Command { InputOption::VALUE_NONE, 'show update(s) without updating' ) - + ->addOption( + 'allow-unstable', + null, + InputOption::VALUE_NONE, + 'allow updating to unstable releases' + ) ; } @@ -100,13 +105,13 @@ class Update extends Command { $return = 0; foreach ($apps as $appId) { - $newVersion = $this->installer->isUpdateAvailable($appId); + $newVersion = $this->installer->isUpdateAvailable($appId, $input->getOption('allow-unstable')); if ($newVersion) { $output->writeln($appId . ' new version available: ' . $newVersion); if (!$input->getOption('showonly')) { try { - $result = $this->installer->updateAppstoreApp($appId); + $result = $this->installer->updateAppstoreApp($appId, $input->getOption('allow-unstable')); } catch (\Exception $e) { $this->logger->logException($e, ['message' => 'Failure during update of app "' . $appId . '"','app' => 'app:update']); $output->writeln('Error: ' . $e->getMessage()); |