deployer
deployer copied to clipboard
The rsync array options should be merged with defaults
-
Deployer version: 7.0.0-rc3
-
Deployment OS: Mac OSX Monterey
Please, provide a minimal reproducible example of deploy.php
https://deployer.org/docs/7.x/contrib/rsync
When defining rsync
options only with exclude
:
set('rsync',[
'exclude' => [
'.git',
'deploy.php',
'assets',
],
]);
The deploy will fail:
[49.12.78.161] ErrorException in rsync.php on line 257:
[49.12.78.161]
[49.12.78.161] Undefined array key "flags"
[49.12.78.161]
Not sure if it would be possible to define defaults somewhere else so I need not configure all rsync options.
PS: I hope its fine that I created seperate issues and not did pack all into one big issue.
Can't you do:
set('rsync', function () {
return array_merge(get('rsync'), [
'exclude' => [
'.git',
'deploy.php',
],
]);
});
Hello, Same issue when importing in the deploy.php a yml file with custom conf Placing it in the dpeloy.php makes no sens as the list of excluded files can changed from projects to another.
rsync:
exclude:
- '.git*'
- .bundler
- deploy.php
We are obliged to put the whole thing
rsync:
exclude:
- '.git*'
- .bundler
- deploy.php
flags: 'rzcE'
options: ['delete', 'delete-after', 'force']
timeout: 3600
include: []
filter: []
exclude-file: false
include-file: false
filter-file: false
filter-perdir: false