Fixed naming in plugins (phpci -> builder)
This commit is contained in:
parent
b82427b20f
commit
7ec29f1f31
43 changed files with 330 additions and 376 deletions
|
|
@ -29,11 +29,11 @@ class CopyBuild extends Plugin
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(Builder $phpci, Build $build, array $options = [])
|
||||
public function __construct(Builder $builder, Build $build, array $options = [])
|
||||
{
|
||||
parent::__construct($phpci, $build, $options);
|
||||
parent::__construct($builder, $build, $options);
|
||||
|
||||
$path = $this->phpci->buildPath;
|
||||
$path = $this->builder->buildPath;
|
||||
$this->directory = isset($options['directory']) ? $options['directory'] : $path;
|
||||
$this->wipe = isset($options['wipe']) ? (bool)$options['wipe'] : false;
|
||||
$this->ignore = isset($options['respect_ignore']) ? (bool)$options['respect_ignore'] : false;
|
||||
|
|
@ -44,7 +44,7 @@ class CopyBuild extends Plugin
|
|||
*/
|
||||
public function execute()
|
||||
{
|
||||
$build = $this->phpci->buildPath;
|
||||
$build = $this->builder->buildPath;
|
||||
|
||||
if ($this->directory == $build) {
|
||||
return false;
|
||||
|
|
@ -57,7 +57,7 @@ class CopyBuild extends Plugin
|
|||
$cmd = 'mkdir -p "%s" && xcopy /E "%s" "%s"';
|
||||
}
|
||||
|
||||
$success = $this->phpci->executeCommand($cmd, $this->directory, $build, $this->directory);
|
||||
$success = $this->builder->executeCommand($cmd, $this->directory, $build, $this->directory);
|
||||
|
||||
$this->deleteIgnoredFiles();
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ class CopyBuild extends Plugin
|
|||
{
|
||||
if ($this->wipe === true && $this->directory != '/' && is_dir($this->directory)) {
|
||||
$cmd = 'rm -Rf "%s*"';
|
||||
$success = $this->phpci->executeCommand($cmd, $this->directory);
|
||||
$success = $this->builder->executeCommand($cmd, $this->directory);
|
||||
|
||||
if (!$success) {
|
||||
throw new \Exception(Lang::get('failed_to_wipe', $this->directory));
|
||||
|
|
@ -86,12 +86,12 @@ class CopyBuild extends Plugin
|
|||
protected function deleteIgnoredFiles()
|
||||
{
|
||||
if ($this->ignore) {
|
||||
foreach ($this->phpci->ignore as $file) {
|
||||
foreach ($this->builder->ignore as $file) {
|
||||
$cmd = 'rm -Rf "%s/%s"';
|
||||
if (IS_WIN) {
|
||||
$cmd = 'rmdir /S /Q "%s\%s"';
|
||||
}
|
||||
$this->phpci->executeCommand($cmd, $this->directory, $file);
|
||||
$this->builder->executeCommand($cmd, $this->directory, $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue