pantheon-systems / terminus-rsync-plugin

Terminus Plugin that provides a quick shortcut for rsync-ing files to and from a Pantheon site.
MIT License
18 stars 10 forks source link

Is there a way to limit build artifacts being deployed with --exclude? #15

Closed slothluvchunk closed 4 years ago

slothluvchunk commented 4 years ago

When using this inside of a CI process, there will often be the need to exclude folders like .git or /vendor, etc. I've noticed in the src that there is a hardcoded --exclude .git/ passed along with RsyncOptions, but can't seem to use the --exclude argument in the rsync command itself. It would be great to be able to do something like: terminus rsync site.env ./build_directory/ /pantheon:code/directory/ --exclude .git/ --exclude node_modules/ or similar. Is this available and I'm just missing it, or is this something that can be added?

greg-1-anderson commented 4 years ago

Add -- to your command line. Everything that comes after the -- will be ignored by Terminus and will be passed on to Rsync, so you can add extra --exclude options there.

slothluvchunk commented 4 years ago

Perfect - thanks @greg-1-anderson.