From 7ad1d317cdb368e460fc0e95e9f9dc8798ddf3fe Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Thu, 8 Oct 2015 16:52:44 +0100 Subject: [PATCH] Updating builds to try database config first, and fall back to file config. --- PHPCI/Model/Build.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PHPCI/Model/Build.php b/PHPCI/Model/Build.php index f8d2e378..be7f4a8a 100644 --- a/PHPCI/Model/Build.php +++ b/PHPCI/Model/Build.php @@ -99,6 +99,11 @@ class Build extends BuildBase { $build_config = null; + // Try getting the project build config from the database: + if (empty($build_config)) { + $build_config = $this->getProject()->getBuildConfig(); + } + // Try .phpci.yml if (is_file($buildPath . '/.phpci.yml')) { $build_config = file_get_contents($buildPath . '/.phpci.yml'); @@ -109,11 +114,6 @@ class Build extends BuildBase $build_config = file_get_contents($buildPath . '/phpci.yml'); } - // Try getting the project build config from the database: - if (empty($build_config)) { - $build_config = $this->getProject()->getBuildConfig(); - } - // Fall back to zero config plugins: if (empty($build_config)) { $build_config = $this->getZeroConfigPlugins($builder);