Fixed git checkout for commitId = 'Manual'

This commit is contained in:
Dmitry Khomutov 2014-03-12 23:04:56 +07:00
parent 73d29c83e0
commit e3ff9d405a

View file

@ -65,7 +65,11 @@ class RemoteGitBuild extends Build
protected function cloneByHttp(Builder $builder, $cloneTo)
{
$success = $builder->executeCommand('git clone -b %s %s "%s"', $this->getBranch(), $this->getCloneUrl(), $cloneTo);
$builder->executeCommand('cd "%s" && git checkout %s', $cloneTo, $this->getCommitId());
if (!empty($commit) && $commit != 'Manual') {
$builder->executeCommand('cd "%s" && git checkout %s', $cloneTo, $this->getCommitId());
}
return $success;
}