mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-27 02:12:50 +00:00
Improve dist.ini file and fix CS
This commit is contained in:
parent
3e268d0626
commit
08c2f8b641
@ -1,2 +1,6 @@
|
|||||||
skipClone = true
|
; If set to true, the repo will not be cloned from GitHub and the local copy will be reused.
|
||||||
cmsPath = /path/to/my/local/website/root
|
; 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
|
15
RoboFile.php
15
RoboFile.php
@ -168,7 +168,8 @@ class RoboFile extends \Robo\Tasks
|
|||||||
*/
|
*/
|
||||||
public function createTestingSite()
|
public function createTestingSite()
|
||||||
{
|
{
|
||||||
if (!empty($this->configuration->skipClone)) {
|
if (!empty($this->configuration->skipClone))
|
||||||
|
{
|
||||||
$this->say('Reusing Joomla CMS site already present at ' . $this->cmsPath);
|
$this->say('Reusing Joomla CMS site already present at ' . $this->cmsPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -192,13 +193,15 @@ class RoboFile extends \Robo\Tasks
|
|||||||
{
|
{
|
||||||
$configurationFile = __DIR__ . '/RoboFile.ini';
|
$configurationFile = __DIR__ . '/RoboFile.ini';
|
||||||
|
|
||||||
if (!file_exists($configurationFile)) {
|
if (!file_exists($configurationFile))
|
||||||
|
{
|
||||||
$this->say("No local configuration file");
|
$this->say("No local configuration file");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$configuration = parse_ini_file($configurationFile);
|
$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');
|
$this->say('Local configuration file is empty or wrong (check is it in correct .ini format');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -213,11 +216,13 @@ class RoboFile extends \Robo\Tasks
|
|||||||
*/
|
*/
|
||||||
private function getCmsPath()
|
private function getCmsPath()
|
||||||
{
|
{
|
||||||
if (empty($this->configuration->cmsPath)) {
|
if (empty($this->configuration->cmsPath))
|
||||||
|
{
|
||||||
return 'tests/joomla-cms3';
|
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");
|
$this->say("Cms path written in local configuration does not exists or is not readable");
|
||||||
return 'tests/joomla-cms3';
|
return 'tests/joomla-cms3';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user