Option to chown local user

This commit is contained in:
Francesco Abeni 2015-10-30 15:56:05 +01:00
parent 6562fd304a
commit caf010ce4b
2 changed files with 12 additions and 0 deletions

View File

@ -1,8 +1,13 @@
; 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
; If you want to clone a different branch, you can set it here
branch = staging
; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
localUser = www-data

View File

@ -188,6 +188,13 @@ class RoboFile extends \Robo\Tasks
// Copy cache to the testing folder
$this->_copyDir('tests/cache', $this->cmsPath);
// Optionally change owner to fix permissions issues
if (!empty($this->configuration->localUser) && !$this->isWindows())
{
$this->_exec('chown -R ' . $this->configuration->localUser . ' ' . $this->cmsPath);
}
$this->say('Joomla CMS site created at ' . $this->cmsPath);
}