From da0cea404d3ec2ac1c3f08e3d3791b02b3b958db Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 21 Sep 2016 15:12:00 +0200 Subject: Kill update simulation Signed-off-by: Lukas Reschke --- core/Command/Upgrade.php | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'core/Command/Upgrade.php') diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 69354272de8..9a99473f8fe 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -71,12 +71,6 @@ class Upgrade extends Command { $this ->setName('upgrade') ->setDescription('run upgrade routines after installation of a new release. The release has to be installed before.') - ->addOption( - '--skip-migration-test', - null, - InputOption::VALUE_NONE, - 'skips the database schema migration simulation and update directly' - ) ->addOption( '--dry-run', null, @@ -99,28 +93,12 @@ class Upgrade extends Command { */ protected function execute(InputInterface $input, OutputInterface $output) { - $simulateStepEnabled = true; - $updateStepEnabled = true; $skip3rdPartyAppsDisable = false; - if ($input->getOption('skip-migration-test')) { - $simulateStepEnabled = false; - } - if ($input->getOption('dry-run')) { - $updateStepEnabled = false; - } if ($input->getOption('no-app-disable')) { $skip3rdPartyAppsDisable = true; } - if (!$simulateStepEnabled && !$updateStepEnabled) { - $output->writeln( - 'Only one of "--skip-migration-test" or "--dry-run" ' . - 'can be specified at a time.' - ); - return self::ERROR_INVALID_ARGUMENTS; - } - if(\OC::checkUpgrade(false)) { if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { // Prepend each line with a little timestamp @@ -135,8 +113,6 @@ class Upgrade extends Command { $this->logger ); - $updater->setSimulateStepEnabled($simulateStepEnabled); - $updater->setUpdateStepEnabled($updateStepEnabled); $updater->setSkip3rdPartyAppsDisable($skip3rdPartyAppsDisable); $dispatcher = \OC::$server->getEventDispatcher(); $progress = new ProgressBar($output); @@ -229,11 +205,10 @@ class Upgrade extends Command { }); $updater->listen('\OC\Updater', 'updateEnd', function ($success) use($output, $updateStepEnabled, $self) { - $mode = $updateStepEnabled ? 'Update' : 'Update simulation'; if ($success) { - $message = "$mode successful"; + $message = "Update successful"; } else { - $message = "$mode failed"; + $message = "Update failed"; } $output->writeln($message); }); -- cgit v1.2.3