mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-02-04 18:28:25 +00:00
Merge pull request #109 from yvesh/master
Added local caching for the cloned joomla-cms
This commit is contained in:
commit
6352c630ce
1
.gitignore
vendored
1
.gitignore
vendored
@ -56,3 +56,4 @@ tests/_output*
|
|||||||
selenium-server-standalone.jar
|
selenium-server-standalone.jar
|
||||||
codecept.phar
|
codecept.phar
|
||||||
selenium.log
|
selenium.log
|
||||||
|
tests/cache
|
||||||
|
11
RoboFile.php
11
RoboFile.php
@ -164,9 +164,10 @@ class RoboFile extends \Robo\Tasks
|
|||||||
*/
|
*/
|
||||||
public function createTestingSite()
|
public function createTestingSite()
|
||||||
{
|
{
|
||||||
if (!empty($this->configuration->skipClone)) {
|
// Caching cloned installations locally
|
||||||
$this->say('Reusing Joomla CMS site already present at tests/joomla-cms3');
|
if (!is_dir('tests/cache') || (time() - filemtime('tests/cache') > 60 * 60 * 24))
|
||||||
return;
|
{
|
||||||
|
$this->_exec('git' . $this->extension . ' clone -b staging --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/cache');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Joomla Clean Testing sites
|
// Get Joomla Clean Testing sites
|
||||||
@ -175,7 +176,9 @@ class RoboFile extends \Robo\Tasks
|
|||||||
$this->taskDeleteDir('tests/joomla-cms3')->run();
|
$this->taskDeleteDir('tests/joomla-cms3')->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_exec('git' . $this->extension . ' clone -b staging --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/joomla-cms3');
|
// Copy cache to the testing folder
|
||||||
|
$this->_copyDir('tests/cache', 'tests/joomla-cms3');
|
||||||
|
|
||||||
$this->say('Joomla CMS site created at tests/joomla-cms3');
|
$this->say('Joomla CMS site created at tests/joomla-cms3');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user