Few fixes for windows
This commit is contained in:
parent
3a0e62657b
commit
d7db9cf593
3 changed files with 13 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue