Skip to content
Permalink
Browse files

Defaulting to using neither --prefer-source or --prefer-dist for comp…

…oser. Allow user to specify either.
  • Loading branch information...
Dan Cryer
Dan Cryer committed Apr 27, 2016
1 parent 21d5f49 commit 6418fde928e853dd1642902649e7697eceba31ab
Showing with 11 additions and 4 deletions.
  1. +0 −1 .phpci.yml
  2. +11 −3 PHPCI/Plugin/Composer.php
@@ -13,7 +13,6 @@ build_settings:
setup:
composer:
action: "install"
prefer_dist: false

test:
php_parallel_lint:
@@ -61,6 +61,7 @@ public function __construct(Builder $phpci, Build $build, array $options = array
$this->directory = $path;
$this->action = 'install';
$this->preferDist = false;
$this->preferSource = false;
$this->nodev = false;
if (array_key_exists('directory', $options)) {
@@ -75,6 +76,11 @@ public function __construct(Builder $phpci, Build $build, array $options = array
$this->preferDist = (bool)$options['prefer_dist'];
}
if (array_key_exists('prefer_source', $options)) {
$this->preferDist = false;
$this->preferSource = (bool)$options['prefer_source'];
}
if (array_key_exists('no_dev', $options)) {
$this->nodev = (bool)$options['no_dev'];
}
@@ -97,10 +103,12 @@ public function execute()
if ($this->preferDist) {
$this->phpci->log('Using --prefer-dist flag');
$cmd .= '--prefer-dist';
} else {
$cmd .= ' --prefer-dist';
}
if ($this->preferSource) {
$this->phpci->log('Using --prefer-source flag');
$cmd .= '--prefer-source';
$cmd .= ' --prefer-source';
}
if ($this->nodev) {

0 comments on commit 6418fde

Please sign in to comment.
You can’t perform that action at this time.