コード例 #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;
 }
コード例 #2
0
ファイル: DeployCommand.php プロジェクト: jkhaled/Couscous
 /**
  * {@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');
 }
コード例 #3
0
ファイル: Deployer.php プロジェクト: jkhaled/Couscous
 private function pushBranch(OutputInterface $output, $branch, $tmpDirectory)
 {
     $output->writeln("Pushing <info>{$branch}</info> (GitHub may ask you to login)");
     $this->git->push($tmpDirectory, $branch);
 }