cschlosser / drone-ftps

Deploy to FTPS server from Drone CI build
https://hub.docker.com/r/cschlosser/drone-ftps/
Apache License 2.0
20 stars 16 forks source link

Transfer specific files #18

Open walkero-gr opened 4 years ago

walkero-gr commented 4 years ago

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?

cschlosser commented 4 years ago

You should be able to do something like this:

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

unless drone changed the way they're passing arrays.

walkero-gr commented 4 years ago

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?

fuse314 commented 2 years ago

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$