localVersion(); $remote = $updater->remoteVersion($repo, $branch); if ($remote === '') { $this->fail('Не удалось прочитать версию ядра из ' . $repo . '@' . $branch); return 1; } $this->line('У вас: ' . $local); $this->line('В ' . $repo . '@' . $branch . ': ' . $remote); $cmp = version_compare($remote, $local); if ($cmp <= 0) { $this->ok('Вы на актуальной версии или свежее.'); return 0; } $this->line(); $changelog = Updater::changelogSince($updater->remoteChangelog($repo, $branch), $local); if ($changelog !== '') { $this->line($changelog); } else { $this->line('Отстаёте, но docs/CHANGELOG.md в ядре не прочитать или в нём нет записей новее вашей версии.'); } return 0; } }