-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of include exclude #34
Comments
With rsync everything is included by default. You choose what to exclude from that, while overriding specific excludes with some includes. Afaiu this is the pattern that's enabled by having includes come before excludes when we build the rsync command. There's been some discussion about this before #16 Not sure why you're setting the options: {
recursive: true,
src: "webroot/",
exclude: ["scss"],
dryRun: true,
dest: "/path/to/files",
host: "user@host.com",
} I might be misunderstanding though! Let me know how you get on, will be happy to merge your PR if it genuinely scratches an itch. |
So my real problem is that I have:
I want to copy config, webroot, and vendor folders but nothing else. I could write this as
But then I have to always maintain a list of what I don't want. If I add a I can do this as three separate rsync operations:
which may be a fine solution in my case but doesn't scale. I don't really understand all the intricacies of rsync patterns, but it seems like I understand the desire to keep the wrapper simple (and have the options map directly to real rsync options), but IMO this is a real itch if you want to do non-trivial rsync operations. |
This would address #13 also. |
Aha, ok. I think I see what you're saying now. You want to be able to define a whitelist of things to include, while excluding everything else, with the added complication of excluding some sub paths. Have you looked into the That said, your PR looks good (thanks for the docs and tests!), so I'll merge it right away. Cheers! |
I am having trouble using exclude and include. What I want to do is copy everything from the
webroot
folder except thewebroot/scss
folder.I can do it from the commandline like
But I cannot figure out how to do it using rsyncwrapper since include[] always comes before exclude[].
For now I am doing this as a workaround
Would it make sense to allow something like
Or is there some clever way to write the include/exclude rules to make it work as is?
The text was updated successfully, but these errors were encountered: