Example #1
0
 private function fetchGitTemplate($gitUrl)
 {
     $this->logger->notice('Fetching template from {url}', ['url' => $gitUrl]);
     $directory = $this->createTempDirectory('couscous_template_');
     $this->git->cloneRepository($gitUrl, $directory);
     return $directory;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     try {
         $remoteUrl = $this->git->getRemoteUrl();
     } catch (\Exception $e) {
         $remoteUrl = null;
     }
     $this->setName('deploy')->setDescription('Generate and deploy the website')->addArgument('source', InputArgument::OPTIONAL, 'Repository you want to generate.', getcwd())->addOption('repository', null, InputOption::VALUE_REQUIRED, 'Target repository in which to deploy the website.', $remoteUrl)->addOption('branch', null, InputOption::VALUE_REQUIRED, 'Target branch in which to deploy the website.', 'gh-pages');
 }
Example #3
0
 private function pushBranch(OutputInterface $output, $branch, $tmpDirectory)
 {
     $output->writeln("Pushing <info>{$branch}</info> (GitHub may ask you to login)");
     $this->git->push($tmpDirectory, $branch);
 }