update CLTools

This commit is contained in:
Romain Neutron
2012-10-02 14:13:56 +02:00
parent 9c12e24656
commit c68def16e8
2 changed files with 12 additions and 6 deletions

View File

@@ -45,16 +45,18 @@ try {
under certain conditions; type `about:license' for details.\n\n"
. ' KONSOLE KOMMANDER', Version::getName() . ' ' . Version::getNumber());
if (!$app['phraseanet.configuration']->isInstalled()) {
if (!$app['phraseanet.configuration-tester']->isInstalled()) {
throw new \RuntimeException('Phraseanet is not installed, use setup command instead');
}
if (!$app['phraseanet.configuration-tester']->isUpToDate()) {
throw new \RuntimeException('Phraseanet is not up-to-date, use setup command instead');
}
$app->command(new \module_console_aboutAuthors('about:authors'));
$app->command(new \module_console_aboutLicense('about:license'));
$app->command(new \module_console_checkExtension('check:extension'));
$app->command(new \module_console_systemUpgrade('system:upgrade'));
$app->command(new UpgradeDBDatas('system:upgrade-datas'));
$app->command(new \module_console_sphinxGenerateSuggestion('sphinx:generate-suggestions'));

View File

@@ -48,14 +48,18 @@ try {
under certain conditions; type `about:license' for details.\n\n"
. ' SETUP', Version::getName() . ' ' . Version::getNumber());
$tester = new \Alchemy\Phrasea\Setup\ConfigurationTester($app);
$app->command(new \module_console_aboutAuthors('about:authors'));
$app->command(new \module_console_aboutLicense('about:license'));
if ($tester->isInstalled()) {
if(
$app['phraseanet.configuration-tester']->isMigrable()
|| $app['phraseanet.configuration-tester']->isUpgradable()
|| $app['phraseanet.configuration-tester']->isInstalled()
) {
$app->command(new \module_console_systemUpgrade('system:upgrade'));
}
if ($app['phraseanet.configuration-tester']->isInstalled()) {
$app->command(new UpgradeDBDatas('system:upgrade-datas'));
}