Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add a return message for app updates trough occ
Signed-off-by: Git'Fellow <[email protected]>

Handle single and all apps

Signed-off-by: Git'Fellow <[email protected]>

Rewrite logic

Fix psalm

Fix psalm

Signed-off-by: Git'Fellow <[email protected]>
  • Loading branch information
solracsf authored and skjnldsv committed Feb 23, 2024
commit 6dfe3c91d5fe1e363371ffadaf10706e23ffd5b6
10 changes: 10 additions & 0 deletions core/Command/App/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ protected function configure(): void {

protected function execute(InputInterface $input, OutputInterface $output): int {
$singleAppId = $input->getArgument('app-id');
$updateFound = false;

if ($singleAppId) {
$apps = [$singleAppId];
Expand All @@ -97,6 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
foreach ($apps as $appId) {
$newVersion = $this->installer->isUpdateAvailable($appId, $input->getOption('allow-unstable'));
if ($newVersion) {
$updateFound = true;
$output->writeln($appId . ' new version available: ' . $newVersion);

if (!$input->getOption('showonly')) {
Expand All @@ -122,6 +124,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
}

if (!$updateFound) {
if ($singleAppId) {
$output->writeln($singleAppId . ' is up-to-date or no updates could be found');
} else {
$output->writeln('All apps are up-to-date or no updates could be found');
}
}

return $return;
}
}