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
|
|
@ -49,9 +49,7 @@ class CleanBuild extends Plugin
|
|||
public function execute()
|
||||
{
|
||||
$cmd = 'rm -Rf "%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'rmdir /S /Q "%s"';
|
||||
}
|
||||
|
||||
$this->builder->executeCommand($cmd, $this->builder->buildPath . 'composer.phar');
|
||||
$this->builder->executeCommand($cmd, $this->builder->buildPath . 'composer.lock');
|
||||
|
||||
|
|
|
|||
|
|
@ -129,10 +129,6 @@ class Codeception extends Plugin implements ZeroConfigPluginInterface
|
|||
|
||||
$cmd = 'cd "%s" && ' . $codeception . ' run -c "%s" --xml ' . $this->args;
|
||||
|
||||
if (IS_WIN) {
|
||||
$cmd = 'cd /d "%s" && ' . $codeception . ' run -c "%s" --xml ' . $this->args;
|
||||
}
|
||||
|
||||
$configPath = $this->builder->buildPath . $configPath;
|
||||
$success = $this->builder->executeCommand($cmd, $this->builder->buildPath, $configPath);
|
||||
|
||||
|
|
|
|||
|
|
@ -104,14 +104,7 @@ class Composer extends Plugin implements ZeroConfigPluginInterface
|
|||
public function execute()
|
||||
{
|
||||
$composerLocation = $this->builder->findBinary(['composer', 'composer.phar']);
|
||||
|
||||
$cmd = '';
|
||||
|
||||
if (IS_WIN) {
|
||||
$cmd = 'php ';
|
||||
}
|
||||
|
||||
$cmd .= $composerLocation . ' --no-ansi --no-interaction ';
|
||||
$cmd = $composerLocation . ' --no-ansi --no-interaction ';
|
||||
|
||||
if ($this->preferDist) {
|
||||
$this->builder->log('Using --prefer-dist flag');
|
||||
|
|
|
|||
|
|
@ -62,9 +62,6 @@ class CopyBuild extends Plugin
|
|||
$this->wipeExistingDirectory();
|
||||
|
||||
$cmd = 'mkdir -p "%s" && cp -R "%s" "%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'mkdir -p "%s" && xcopy /E "%s" "%s"';
|
||||
}
|
||||
|
||||
$success = $this->builder->executeCommand($cmd, $this->directory, $build, $this->directory);
|
||||
|
||||
|
|
@ -97,9 +94,6 @@ class CopyBuild extends Plugin
|
|||
if ($this->ignore) {
|
||||
foreach ($this->builder->ignore as $file) {
|
||||
$cmd = 'rm -Rf "%s/%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'rmdir /S /Q "%s\%s"';
|
||||
}
|
||||
$this->builder->executeCommand($cmd, $this->directory, $file);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,18 +74,12 @@ class Grunt extends Plugin
|
|||
{
|
||||
// if npm does not work, we cannot use grunt, so we return false
|
||||
$cmd = 'cd %s && npm install';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'cd /d %s && npm install';
|
||||
}
|
||||
if (!$this->builder->executeCommand($cmd, $this->directory)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// build the grunt command
|
||||
$cmd = 'cd %s && ' . $this->grunt;
|
||||
if (IS_WIN) {
|
||||
$cmd = 'cd /d %s && ' . $this->grunt;
|
||||
}
|
||||
$cmd .= ' --no-color';
|
||||
$cmd .= ' --gruntfile %s';
|
||||
$cmd .= ' %s'; // the task that will be executed
|
||||
|
|
|
|||
|
|
@ -74,18 +74,12 @@ class Gulp extends Plugin
|
|||
{
|
||||
// if npm does not work, we cannot use gulp, so we return false
|
||||
$cmd = 'cd %s && npm install';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'cd /d %s && npm install';
|
||||
}
|
||||
if (!$this->builder->executeCommand($cmd, $this->directory)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// build the gulp command
|
||||
$cmd = 'cd %s && ' . $this->gulp;
|
||||
if (IS_WIN) {
|
||||
$cmd = 'cd /d %s && ' . $this->gulp;
|
||||
}
|
||||
$cmd .= ' --no-color';
|
||||
$cmd .= ' --gulpfile %s';
|
||||
$cmd .= ' %s'; // the task that will be executed
|
||||
|
|
|
|||
|
|
@ -55,11 +55,10 @@ class Wipe extends Plugin
|
|||
}
|
||||
if (is_dir($this->directory)) {
|
||||
$cmd = 'rm -Rf "%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'rmdir /S /Q "%s"';
|
||||
}
|
||||
|
||||
return $this->builder->executeCommand($cmd, $this->directory);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue