diff --git a/RoboFile.dist.ini b/RoboFile.dist.ini index 8d3a728..615510f 100644 --- a/RoboFile.dist.ini +++ b/RoboFile.dist.ini @@ -1,2 +1,6 @@ -skipClone = true -cmsPath = /path/to/my/local/website/root \ No newline at end of file +; If set to true, the repo will not be cloned from GitHub and the local copy will be reused. +; This setting will be obsolete once we have local Git cache enabled +skipClone = false +; If you want to setup your test website in a different folder, you can do that here. +; You can also set an absolute path, i.e. /path/to/my/cms/folder +cmsPath = tests/joomla-cms3 \ No newline at end of file diff --git a/RoboFile.php b/RoboFile.php index 216acce..48e8daf 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -168,7 +168,8 @@ class RoboFile extends \Robo\Tasks */ public function createTestingSite() { - if (!empty($this->configuration->skipClone)) { + if (!empty($this->configuration->skipClone)) + { $this->say('Reusing Joomla CMS site already present at ' . $this->cmsPath); return; } @@ -192,13 +193,15 @@ class RoboFile extends \Robo\Tasks { $configurationFile = __DIR__ . '/RoboFile.ini'; - if (!file_exists($configurationFile)) { + if (!file_exists($configurationFile)) + { $this->say("No local configuration file"); return null; } $configuration = parse_ini_file($configurationFile); - if ($configuration === false) { + if ($configuration === false) + { $this->say('Local configuration file is empty or wrong (check is it in correct .ini format'); return null; } @@ -213,11 +216,13 @@ class RoboFile extends \Robo\Tasks */ private function getCmsPath() { - if (empty($this->configuration->cmsPath)) { + if (empty($this->configuration->cmsPath)) + { return 'tests/joomla-cms3'; } - if (!file_exists(dirname($this->configuration->cmsPath))) { + if (!file_exists(dirname($this->configuration->cmsPath))) + { $this->say("Cms path written in local configuration does not exists or is not readable"); return 'tests/joomla-cms3'; }