Few fixes for windows
This commit is contained in:
parent
d9264378e7
commit
3ea6b720b1
|
@ -38,6 +38,9 @@ class CleanBuild implements \PHPCI\Plugin
|
|||
public function execute()
|
||||
{
|
||||
$cmd = 'rm -Rf "%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'rmdir /S /Q "%s"';
|
||||
}
|
||||
$this->phpci->executeCommand($cmd, $this->phpci->buildPath . 'composer.phar');
|
||||
$this->phpci->executeCommand($cmd, $this->phpci->buildPath . 'composer.lock');
|
||||
|
||||
|
|
|
@ -46,11 +46,17 @@ class CopyBuild implements \PHPCI\Plugin
|
|||
}
|
||||
|
||||
$cmd = 'mkdir -p "%s" && cp -R "%s" "%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'mkdir -p "%s" && xcopy /E "%s" "%s"';
|
||||
}
|
||||
$success = $this->phpci->executeCommand($cmd, $this->directory, $build, $this->directory);
|
||||
|
||||
if ($this->ignore) {
|
||||
foreach ($this->phpci->ignore as $file) {
|
||||
$cmd = 'rm -Rf "%s/%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'rmdir /S /Q "%s\%s"';
|
||||
}
|
||||
$this->phpci->executeCommand($cmd, $this->directory, $file);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,10 @@ class Wipe implements \PHPCI\Plugin
|
|||
return true;
|
||||
}
|
||||
if (is_dir($this->directory)) {
|
||||
$cmd = 'rm -rf %s*';
|
||||
$cmd = 'rm -Rf "%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'rmdir /S /Q "%s"';
|
||||
}
|
||||
$success = $this->phpci->executeCommand($cmd, $this->directory);
|
||||
}
|
||||
return $success;
|
||||
|
|
Loading…
Reference in a new issue