mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
cbaa87ebd9
commit
6c3e9cf4cc
2 changed files with 14 additions and 3 deletions
|
@ -35,18 +35,21 @@ class DownloadMicroweber implements ShouldQueue
|
|||
ShellApi::exec('chmod +x ' . $shellPath . '/*');
|
||||
|
||||
$mwComposerClientHelper = new MicroweberComposerClientHelper();
|
||||
$instance = $mwComposerClientHelper->getComposerClientInstance();
|
||||
$instance->prepareHeaders();
|
||||
|
||||
|
||||
// Download core app
|
||||
$status = $mwComposerClientHelper->getMicroweberDownloaderInstance()->download(config('microweber.sharedPaths.app'));
|
||||
|
||||
// Download modules
|
||||
$modulesDownloader = new MicroweberModuleConnectorsDownloader();
|
||||
$modulesDownloader->setComposerClient($mwComposerClientHelper->getComposerClientInstance());
|
||||
$modulesDownloader->setComposerClient($instance);
|
||||
$status = $modulesDownloader->download(config('microweber.sharedPaths.modules'));
|
||||
|
||||
// Download templates
|
||||
$templatesDownloader = new MicroweberTemplatesDownloader();
|
||||
$templatesDownloader->setComposerClient($mwComposerClientHelper->getComposerLicensedInstance());
|
||||
$templatesDownloader->setComposerClient($instance);
|
||||
$status = $templatesDownloader->download(config('microweber.sharedPaths.templates'));
|
||||
|
||||
}
|
||||
|
|
|
@ -13,9 +13,17 @@ class MicroweberComposerClientHelper
|
|||
$composerClient = new Client();
|
||||
$composerClient->packageServers = [
|
||||
'https://market.microweberapi.com/packages/microweberserverpackages/packages.json',
|
||||
'https://packages.microweberapi.com/packages/microweber/packages.json',
|
||||
];
|
||||
|
||||
return $composerClient;
|
||||
$lic = setting('whitelabel_license_key');
|
||||
|
||||
if($lic) {
|
||||
$composerClient->addLicense([
|
||||
'local_key' => $lic
|
||||
]);
|
||||
}
|
||||
return $composerClient;
|
||||
}
|
||||
|
||||
public function getComposerLicensedInstance()
|
||||
|
|
Loading…
Reference in a new issue