mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
parent
136cfea039
commit
8e24d17efd
@ -65,11 +65,13 @@ class RsyncMultiHostPublisher extends FilesystemPublisher {
|
|||||||
if(isset($_GET['norsync']) && $_GET['norsync']) return;
|
if(isset($_GET['norsync']) && $_GET['norsync']) return;
|
||||||
|
|
||||||
$extraArg = "";
|
$extraArg = "";
|
||||||
if($this->config()->excluded_folders) foreach($this->config()->excluded_folders as $folder) {
|
$excludedFolders = Config::inst()->get('RsyncMultiHostPublisher', 'excluded_folders');
|
||||||
|
if($excludedFolders) foreach($excludedFolders as $folder) {
|
||||||
$extraArg .= " --exclude " . escapeshellarg($folder);
|
$extraArg .= " --exclude " . escapeshellarg($folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach((array)$this->config()->targets as $target) {
|
$targets = Config::inst()->get('RsyncMultiHostPublisher', 'targets');
|
||||||
|
foreach((array)$targets as $target) {
|
||||||
// Transfer non-PHP content from everything to the target; that will ensure that we have all the JS/CSS/etc
|
// Transfer non-PHP content from everything to the target; that will ensure that we have all the JS/CSS/etc
|
||||||
$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`;
|
$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`;
|
||||||
// Then transfer "safe" PHP from the cache/ directory
|
// Then transfer "safe" PHP from the cache/ directory
|
||||||
|
Loading…
Reference in New Issue
Block a user