checkout() public method

public checkout ( Shopware\Plugin\Struct\Plugin $plugin, string $path, string $branch = null, boolean $useHttp = false )
$plugin Shopware\Plugin\Struct\Plugin
$path string
$branch string
$useHttp boolean
Esempio n. 1
0
 /**
  * @param Plugin $plugin
  * @param        $path
  * @param        $zipTo
  * @param        $branch
  * @param bool   $useHttp
  *
  * @return string
  */
 public function zip(Plugin $plugin, $path, $zipTo, $branch, $useHttp = false)
 {
     $this->checkout->checkout($plugin, $path, $branch, $useHttp);
     $outputFile = "{$zipTo}/{$plugin->name}.zip";
     $this->zipDir($plugin->module, $outputFile);
     return $outputFile;
 }
Esempio n. 2
0
 /**
  * @param Plugin $plugin
  * @param string $shopwarePath
  * @param bool   $inputActivate
  * @param string $branch
  * @param bool   $useHttp
  */
 public function install(Plugin $plugin, $shopwarePath, $inputActivate = false, $branch = 'master', $useHttp = false)
 {
     $pluginName = $plugin->name;
     $this->checkout->checkout($plugin, $shopwarePath . '/engine/Shopware/Plugins/Local/', $branch, $useHttp);
     if ($inputActivate) {
         $this->ioService->writeln(exec($shopwarePath . '/bin/console sw:plugin:refresh'));
         $this->ioService->writeln(exec($shopwarePath . '/bin/console sw:plugin:install --activate ' . $pluginName));
     }
     $this->addPluginVcsMapping($plugin, $shopwarePath);
     return;
 }