Fixed project directory for Build::writeSshKey and
Build::writeSshWrapper. Issue #165.
This commit is contained in:
parent
e7c4c4cc9d
commit
7747193c89
|
@ -472,7 +472,7 @@ class Build extends BaseBuild
|
||||||
*/
|
*/
|
||||||
protected function writeSshKey($cloneTo)
|
protected function writeSshKey($cloneTo)
|
||||||
{
|
{
|
||||||
$keyPath = dirname($cloneTo . '/temp');
|
$keyPath = $cloneTo . 'temp';
|
||||||
$keyFile = $keyPath . '.key';
|
$keyFile = $keyPath . '.key';
|
||||||
|
|
||||||
file_put_contents($keyFile, $this->getProject()->getSshPrivateKey());
|
file_put_contents($keyFile, $this->getProject()->getSshPrivateKey());
|
||||||
|
@ -491,7 +491,7 @@ class Build extends BaseBuild
|
||||||
*/
|
*/
|
||||||
protected function writeSshWrapper($cloneTo, $keyFile)
|
protected function writeSshWrapper($cloneTo, $keyFile)
|
||||||
{
|
{
|
||||||
$path = dirname($cloneTo . '/temp');
|
$path = $cloneTo . 'temp';
|
||||||
$wrapperFile = $path . '.sh';
|
$wrapperFile = $path . '.sh';
|
||||||
|
|
||||||
$sshFlags = '-o CheckHostIP=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o PasswordAuthentication=no';
|
$sshFlags = '-o CheckHostIP=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o PasswordAuthentication=no';
|
||||||
|
|
|
@ -109,7 +109,7 @@ class GitBuild extends Build
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmd .= ' -b "%s" "%s" "%s"';
|
$cmd .= ' -b "%s" "%s" "%s"';
|
||||||
$cmd = 'export GIT_SSH="'.$gitSshWrapper.'" && ' . $cmd;
|
$cmd = 'export GIT_SSH="' . $gitSshWrapper . '" && ' . $cmd;
|
||||||
|
|
||||||
$success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);
|
$success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class HgBuild extends Build
|
||||||
$keyFile = $this->writeSshKey($cloneTo);
|
$keyFile = $this->writeSshKey($cloneTo);
|
||||||
|
|
||||||
// Do the hg clone:
|
// Do the hg clone:
|
||||||
$cmd = 'hg clone --ssh "ssh -i '.$keyFile.'" %s "%s" -r %s';
|
$cmd = 'hg clone --ssh "ssh -i ' . $keyFile . '" %s "%s" -r %s';
|
||||||
$success = $builder->executeCommand($cmd, $this->getCloneUrl(), $cloneTo, $this->getBranch());
|
$success = $builder->executeCommand($cmd, $this->getCloneUrl(), $cloneTo, $this->getBranch());
|
||||||
|
|
||||||
if ($success) {
|
if ($success) {
|
||||||
|
|
Loading…
Reference in a new issue