Shopware\Install\Services\ReleaseDownloader::downloadRelease PHP Method

downloadRelease() public method

Download a release and unzip it
public downloadRelease ( string $release, string $installDir )
$release string
$installDir string
    public function downloadRelease($release, $installDir)
    {
        $this->ioService->writeln("<info>Downloading release</info>");
        $zipLocation = $this->downloadFromUpdateApi($release);
        if (!is_dir($installDir)) {
            mkdir($installDir);
        }
        $this->ioService->writeln("<info>Unzipping archive</info>");
        $this->processExecutor->execute("unzip -qq {$zipLocation} -d {$installDir}");
    }

Usage Example

示例#1
0
 /**
  * @param InstallationRequest $request
  */
 public function installShopware(InstallationRequest $request)
 {
     $this->releaseDownloader->downloadRelease($request->release, $request->installDir);
     $this->generateVcsMapping($request->installDir);
     $this->writeShopwareConfig($request->installDir, $request->databaseName);
     $this->setupDatabase($request);
     $this->lockInstaller($request->installDir);
     $this->ioService->writeln("<info>Running post release scripts</info>");
     $this->postInstall->fixPermissions($request->installDir);
     $this->postInstall->setupTheme($request->installDir);
     $this->postInstall->importCustomDeltas($request->databaseName);
     $this->postInstall->runCustomScripts($request->installDir);
     $this->demodata->runLicenseImport($request->installDir);
     $this->ioService->writeln("<info>Install completed</info>");
 }
All Usage Examples Of Shopware\Install\Services\ReleaseDownloader::downloadRelease