From 442251e6badd8736ac519262b85b17ee4699b6ba Mon Sep 17 00:00:00 2001 From: Javad Khorashadizade <43370342+khorashadi666@users.noreply.github.com> Date: Sat, 8 Apr 2023 13:53:49 +0330 Subject: [PATCH] add include --- src/rsyncCli.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rsyncCli.js b/src/rsyncCli.js index 562a22e..7b80a76 100644 --- a/src/rsyncCli.js +++ b/src/rsyncCli.js @@ -51,11 +51,12 @@ const validateRsync = async () => { }; const rsyncCli = async ({ - source, rsyncServer, exclude, remotePort, + source, rsyncServer, exclude, include, remotePort, privateKeyPath, args, sshCmdArgs }) => { console.log(`[Rsync] Starting Rsync Action: ${source} to ${rsyncServer}`); if (exclude && exclude.length > 0) console.log(`[Rsync] excluding folders ${exclude}`); + if (include && include.length > 0) console.log(`[Rsync] including folders ${include}`); const defaultOptions = { ssh: true, @@ -68,7 +69,7 @@ const rsyncCli = async ({ /* eslint-disable object-property-newline */ return nodeRsyncPromise({ ...defaultOptions, - src: source, dest: rsyncServer, excludeFirst: exclude, port: remotePort, + src: source, dest: rsyncServer, excludeFirst: exclude, includeFirst: include, port: remotePort, privateKey: privateKeyPath, args, sshCmdArgs }); };