Removed hacks for Windows OS (Because it isn't work fine all the same)
This commit is contained in:
parent
7e735bbb3b
commit
8779880a8f
23 changed files with 36 additions and 240 deletions
|
|
@ -47,9 +47,6 @@ class LocalBuild extends Build
|
|||
return $this->handleSymlink($builder, $reference, $buildPath);
|
||||
} else {
|
||||
$cmd = 'cp -Rf "%s" "%s/"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'xcopy /E /Y "%s" "%s/*"';
|
||||
}
|
||||
$builder->executeCommand($cmd, $reference, $buildPath);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,11 +77,8 @@ class RemoteGitBuild extends Build
|
|||
*/
|
||||
protected function cloneBySsh(Builder $builder, $cloneTo)
|
||||
{
|
||||
$keyFile = $this->writeSshKey($cloneTo);
|
||||
|
||||
if (!IS_WIN) {
|
||||
$gitSshWrapper = $this->writeSshWrapper($cloneTo, $keyFile);
|
||||
}
|
||||
$keyFile = $this->writeSshKey($cloneTo);
|
||||
$gitSshWrapper = $this->writeSshWrapper($cloneTo, $keyFile);
|
||||
|
||||
// Do the git clone:
|
||||
$cmd = 'git clone --recursive ';
|
||||
|
|
@ -93,10 +90,7 @@ class RemoteGitBuild extends Build
|
|||
}
|
||||
|
||||
$cmd .= ' -b %s %s "%s"';
|
||||
|
||||
if (!IS_WIN) {
|
||||
$cmd = 'export GIT_SSH="'.$gitSshWrapper.'" && ' . $cmd;
|
||||
}
|
||||
$cmd = 'export GIT_SSH="'.$gitSshWrapper.'" && ' . $cmd;
|
||||
|
||||
$success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);
|
||||
|
||||
|
|
@ -106,9 +100,7 @@ class RemoteGitBuild extends Build
|
|||
|
||||
// Remove the key file and git wrapper:
|
||||
unlink($keyFile);
|
||||
if (!IS_WIN) {
|
||||
unlink($gitSshWrapper);
|
||||
}
|
||||
unlink($gitSshWrapper);
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
|
@ -122,9 +114,8 @@ class RemoteGitBuild extends Build
|
|||
protected function postCloneSetup(Builder $builder, $cloneTo)
|
||||
{
|
||||
$success = true;
|
||||
$commit = $this->getCommitId();
|
||||
|
||||
$chdir = IS_WIN ? 'cd /d "%s"' : 'cd "%s"';
|
||||
$commit = $this->getCommitId();
|
||||
$chdir = 'cd "%s"';
|
||||
|
||||
if (!empty($commit) && $commit != 'Manual') {
|
||||
$cmd = $chdir . ' && git checkout %s --quiet';
|
||||
|
|
|
|||
|
|
@ -119,19 +119,15 @@ class SubversionBuild extends Build
|
|||
{
|
||||
$cmd = $this->svnCommand . ' %s "%s"';
|
||||
|
||||
if (!IS_WIN) {
|
||||
$keyFile = $this->writeSshKey($cloneTo);
|
||||
$sshWrapper = $this->writeSshWrapper($cloneTo, $keyFile);
|
||||
$cmd = 'export SVN_SSH="' . $sshWrapper . '" && ' . $cmd;
|
||||
}
|
||||
$keyFile = $this->writeSshKey($cloneTo);
|
||||
$sshWrapper = $this->writeSshWrapper($cloneTo, $keyFile);
|
||||
$cmd = 'export SVN_SSH="' . $sshWrapper . '" && ' . $cmd;
|
||||
|
||||
$success = $builder->executeCommand($cmd, $this->getCloneUrl(), $cloneTo);
|
||||
|
||||
if (!IS_WIN) {
|
||||
// Remove the key file and svn wrapper:
|
||||
unlink($keyFile);
|
||||
unlink($sshWrapper);
|
||||
}
|
||||
// Remove the key file and svn wrapper:
|
||||
unlink($keyFile);
|
||||
unlink($sshWrapper);
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue