Merge pull request #1066 from REBELinBLUE/hide_yml_file

Adding support to check for .phpci.yml so the file can be 'hidden'
This commit is contained in:
Dan Cryer 2015-10-05 15:23:20 +01:00
commit 1c2137bf5d
2 changed files with 7 additions and 1 deletions

View file

@ -99,8 +99,13 @@ class Build extends BuildBase
{ {
$build_config = null; $build_config = null;
// Try .phpci.yml
if (is_file($buildPath . '/.phpci.yml')) {
$build_config = file_get_contents($buildPath . '/.phpci.yml');
}
// Try phpci.yml first: // Try phpci.yml first:
if (is_file($buildPath . '/phpci.yml')) { if (empty($build_config) && is_file($buildPath . '/phpci.yml')) {
$build_config = file_get_contents($buildPath . '/phpci.yml'); $build_config = file_get_contents($buildPath . '/phpci.yml');
} }

View file

@ -151,6 +151,7 @@ class TechnicalDebt implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
$ignores = $this->ignore; $ignores = $this->ignore;
$ignores[] = 'phpci.yml'; $ignores[] = 'phpci.yml';
$ignores[] = '.phpci.yml';
foreach ($iterator as $file) { foreach ($iterator as $file) {
$filePath = $file->getRealPath(); $filePath = $file->getRealPath();