/** * @return bool|null * @throws \App\Satis\Exceptions\PackageBuildFailedException */ public function build() { $this->configPersister->lock($this->buildContext->getItemId()); $command = new BuildCommand($this->buildContext->getConfigFile(), config('satis.build_directory') . DIRECTORY_SEPARATOR . $this->buildContext->getBuildDirectory(), config('satis.proxy')); $command->setItem($this->buildContext->getItemName()); $output = null; try { $output = $command->withCd(base_path())->run($this->asyncMode); } catch (PackageBuildFailedException $e) { $output = $e->getMessage(); } finally { if ($this->asyncMode === false) { $this->configPersister->unlock($this->buildContext->getItemId()); } } return $output; }
/** * Execute the console command. * * @return void */ public function handle() { $this->info('Unlocking UI.'); $this->configPersister->unlock(); }