mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-30 23:54:33 -04:00
revert to exec() to composer install
This commit is contained in:
parent
9b259ed3d0
commit
831d1e0816
@ -15,8 +15,6 @@ use App\Jobs\Util\VersionCheck;
|
|||||||
use Composer\Console\Application;
|
use Composer\Console\Application;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Symfony\Component\Console\Input\ArrayInput;
|
|
||||||
use Symfony\Component\Console\Output\BufferedOutput;
|
|
||||||
|
|
||||||
class PostUpdate extends Command
|
class PostUpdate extends Command
|
||||||
{
|
{
|
||||||
@ -55,22 +53,10 @@ class PostUpdate extends Command
|
|||||||
|
|
||||||
info("finished migrating");
|
info("finished migrating");
|
||||||
|
|
||||||
try {
|
exec('vendor/bin/composer install --no-dev:');
|
||||||
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("finished running composer install ");
|
||||||
|
|
||||||
info(print_r($output->fetch(), 1));
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Artisan::call('optimize');
|
Artisan::call('optimize');
|
||||||
|
@ -75,7 +75,11 @@ class SelfUpdateController extends BaseController
|
|||||||
}
|
}
|
||||||
info('Are there any changes to pull? '.$repo->hasChanges());
|
info('Are there any changes to pull? '.$repo->hasChanges());
|
||||||
|
|
||||||
Artisan::call('ninja:post-update');
|
dispatch(function (){
|
||||||
|
|
||||||
|
Artisan::call('ninja:post-update');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
return response()->json(['message' => ''], 200);
|
return response()->json(['message' => ''], 200);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user