drone-ftps icon indicating copy to clipboard operation
drone-ftps copied to clipboard

Transfer specific files

Open walkero-gr opened this issue 5 years ago • 3 comments
trafficstars

Hello there, Is there a way to transfer only specific files, which names are know? If not, how can I add multiple regex at the PLUGIN_EXCLUDE and PLUGIN_INCLUDE?

walkero-gr avatar Jul 13 '20 23:07 walkero-gr

You should be able to do something like this:

PLUGIN_EXCLUDE:
      - ^\.git/$
      - ^\.gitignore$
      - ^\.drone.yml$

unless drone changed the way they're passing arrays.

cschlosser avatar Jul 18 '20 11:07 cschlosser

Thank you for your reply. I tried that but it doesn't seem to work. The same syntax should work with PLUGIN_INCLUDE? What is the best method to follow when I need to copy only two specific files?

walkero-gr avatar Jul 20 '20 09:07 walkero-gr

according to the code in upload.sh, you can have multiple values for INCLUDE and EXCLUDE separated by commas ,. example

# only include file1.foo and folder1/file2.foo
PLUGIN_INCLUDE: ^file1\.foo$,^folder1/file2\.foo$
# example with exclude...
# PLUGIN_EXCLUDE: ^\.git/$,^\.gitignore$,^\.drone\.yml$

fuse314 avatar Aug 15 '22 13:08 fuse314