true]); } catch (\Exception $e) { info("I wasn't able to migrate the data."); } info("finished migrating"); try { putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer'); $input = new ArrayInput(['command' => 'install', '--no-dev' => 'true']); $application = new Application(); $application->setAutoExit(false); $output = new BufferedOutput(); $application->run($input, $output); }catch(\Exception $e) { info("i wasn't able to compser install"); info(print_r($e->getMessage(),1)); } info("finished running composer install "); info(print_r($output->fetch(), 1)); try { Artisan::call('optimize'); } catch (\Exception $e) { info("I wasn't able to optimize."); } info("optimized"); try { Artisan::call('view:clear'); } catch (\Exception $e) { info("I wasn't able to clear the views."); } info("view cleared"); /* For the following to work, the web user (www-data) must own all the directories */ VersionCheck::dispatch(); info("sent for version check"); echo "Done."; } }