Closed debonx closed 4 years ago
Hello @huraji ; rsync
's exclude patterns are a complicated matter. I think it should be possible since you can do almost all that is possible to do with rsync
(so even reset/bypass wordmove's exclusion list, default include/exclude expressions it uses, rely on an external include/exclude file and so on).
If you could create a stand-alone rsync command that fit your needs, but "ported" to Wordmove it would break, then I'll try to understand why; but find the correct rsync configuration for you is a too hard task for me.
Wordmove prints to STDOUT the rsync command it generates and uses; you can start copying it and elaborating from there. Once you're done we can discuss how to manage that command through Wordmove :)
Thanks @pioneerskies, I appreciate it. I will work it out and I'll keep you posted.
@pioneerskies I handled using rsync_options
like:
- rsync_options: '--verbose --include="wp-content/plugins/coblocks"
and other patterns. Of course would be great to have and include
list like the exclude
one. I don't know much about ruby though, otherwise I would have been very happy to contribute.
<italian>
Ciao e grazie, wordmove è in assoluto uno dei miei tool preferiti!</italian>
Hey @huraji ,
thank you so much for the given feedback. It's absolutely useful for the whole community.
Just let me know: in the exclude
section have you tried to use the following?
- "! wp-content/plugins/coblocks"
- "wp-content/plugins/*"
also trying for some swap-lines-magic between the two?
That said, more than an include option, I'd stuck on this proposal https://github.com/welaika/wordmove/issues/432 which you've already endorsed.
<italian>
Mi fa piacere che Wordmove ti piaccia e che ti sia utile :)</italian>
Oh yes! I actually forgot about that LOL. Let's do it if you can!
I'll keep that one open; BTW tell me if the above suggestion does somehow work. That would be helpful to know
Of course! I will it try tomorrow morning.
- "! wp-content/plugins/coblocks" - "wp-content/plugins/*"
Tried but not working. Also tried interpolation in ruby (the best I could looking around) like:
rsync_options: '--verbose --include="wp-content/plugins/coblocks/*."'{json, php}'"'
rsync_options: '--verbose --include="wp-content/plugins/coblocks/*."'#{json, php}'"'
rsync_options: '--verbose --include="wp-content/plugins/coblocks/*.#{json, php}"'
rsync_options: '--verbose --include="wp-content/plugins/coblocks/*.{json, php}"'
Not working, but possibly because I have poor knowledge about.
@huraji removing the --include
from rsync_options
, this should do what you need:
exclude:
- "+ wp-content/plugins/coblocks/"
- "wp-content/plugins/*"
I have just tested w/ a couple of plugins.
@pioneerskies Excellent. Works like a charme. Thanks!
Can I exclude all folders in a path with exceptions? If yes how? I tried the following without success:
I need to exclude all plugins except those I'm maintaining for a specific environment.