Adds other asset folders we are aware of - Refs #1331
This commit is contained in:
parent
2b3f17adea
commit
5c736df2ee
|
|
@ -25,11 +25,20 @@ class OctoberMirror extends Command
|
||||||
protected $directories = [
|
protected $directories = [
|
||||||
'storage/app/uploads',
|
'storage/app/uploads',
|
||||||
'storage/app/media',
|
'storage/app/media',
|
||||||
|
'storage/temp/public',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $wildcards = [
|
protected $wildcards = [
|
||||||
'modules/*/assets',
|
'modules/*/assets',
|
||||||
|
'modules/*/behaviors/*/assets',
|
||||||
|
'modules/*/widgets/*/assets',
|
||||||
|
'modules/*/formwidgets/*/assets',
|
||||||
|
|
||||||
'plugins/*/*/assets',
|
'plugins/*/*/assets',
|
||||||
|
'plugins/*/*/behaviors/*/assets',
|
||||||
|
'plugins/*/*/formwidgets/*/assets',
|
||||||
|
'plugins/*/*/widgets/*/assets',
|
||||||
|
|
||||||
'themes/*/assets',
|
'themes/*/assets',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -67,7 +76,7 @@ class OctoberMirror extends Command
|
||||||
|
|
||||||
protected function mirrorFile($file)
|
protected function mirrorFile($file)
|
||||||
{
|
{
|
||||||
$this->output->writeln(sprintf('<info> - Mirrored: %s</info>', $file));
|
$this->output->writeln(sprintf('<info> - Mirroring: %s</info>', $file));
|
||||||
|
|
||||||
$src = base_path().'/'.$file;
|
$src = base_path().'/'.$file;
|
||||||
$dest = $this->getDestinationPath().'/'.$file;
|
$dest = $this->getDestinationPath().'/'.$file;
|
||||||
|
|
@ -77,12 +86,12 @@ class OctoberMirror extends Command
|
||||||
|
|
||||||
protected function mirrorDirectory($directory)
|
protected function mirrorDirectory($directory)
|
||||||
{
|
{
|
||||||
$this->output->writeln(sprintf('<info> - Mirrored: %s</info>', $directory));
|
$this->output->writeln(sprintf('<info> - Mirroring: %s</info>', $directory));
|
||||||
|
|
||||||
$src = base_path().'/'.$directory;
|
$src = base_path().'/'.$directory;
|
||||||
$dest = $this->getDestinationPath().'/'.$directory;
|
$dest = $this->getDestinationPath().'/'.$directory;
|
||||||
if (!File::isDirectory($src) || File::isDirectory($dest)) return false;
|
if (!File::isDirectory($src) || File::isDirectory($dest)) return false;
|
||||||
File::makeDirectory(dirname($dest), 0755, true);
|
if (!File::isDirectory(dirname($dest))) File::makeDirectory(dirname($dest), 0755, true);
|
||||||
symlink($src, $dest);
|
symlink($src, $dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue