/**
* Deploy the current contents of our working copy.
*
* @param GitWorkingCopy $workingCopy
*/
protected function deployWithGit(GitWorkingCopy $workingCopy)
{
if (!$workingCopy->hasChanges()) {
return $this->output->writeln('<comment>No changes to deploy!</comment>');
}
$this->output->writeln('<info>Ready to deploy changes:</info>');
$this->output->write($workingCopy->getStatus());
if (!$this->input->getOption('force')) {
if (!$this->askForChangesConfirmation($workingCopy)) {
return $this->output->writeln('<error>Aborted!</error>');
}
}
$this->output->writeln('<info>Deploying...</info>');
$this->output->write($workingCopy->add('.')->commit($this->getCommitMessage())->push()->getOutput(), OutputInterface::VERBOSITY_VERBOSE);
}