mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
45 lines
942 B
PHP
45 lines
942 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use Illuminate\Support\Facades\Process;
|
|
|
|
class UpdateNNTmuxComposer extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'nntmux:composer';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Update composer libraries for NNTmux';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
public function handle(): void
|
|
{
|
|
$this->composer();
|
|
}
|
|
|
|
protected function composer(): void
|
|
{
|
|
$this->output->writeln('<comment>Running composer install process...</comment>');
|
|
$process = Process::timeout(360)->run('composer install');
|
|
echo $process->output();
|
|
echo $process->errorOutput();
|
|
}
|
|
}
|