add include

This commit is contained in:
Javad Khorashadizade 2023-04-08 13:53:49 +03:30 committed by GitHub
parent 3884c8554f
commit 442251e6ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
});
};