mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-04-28 00:37:18 +08:00
Update rsyncCli.js
This commit is contained in:
parent
3884c8554f
commit
825493ef64
@ -51,11 +51,12 @@ const validateRsync = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const rsyncCli = async ({
|
const rsyncCli = async ({
|
||||||
source, rsyncServer, exclude, remotePort,
|
source, rsyncServer, exclude, include, remotePort,
|
||||||
privateKeyPath, args, sshCmdArgs
|
privateKeyPath, args, sshCmdArgs
|
||||||
}) => {
|
}) => {
|
||||||
console.log(`[Rsync] Starting Rsync Action: ${source} to ${rsyncServer}`);
|
console.log(`[Rsync] Starting Rsync Action: ${source} to ${rsyncServer}`);
|
||||||
if (exclude && exclude.length > 0) console.log(`[Rsync] excluding folders ${exclude}`);
|
if (exclude && exclude.length > 0) console.log(`[Rsync] excluding folders ${exclude}`);
|
||||||
|
if (include && include.length > 0) console.log(`[Rsync] including folders ${include}`);
|
||||||
|
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
ssh: true,
|
ssh: true,
|
||||||
@ -68,7 +69,7 @@ const rsyncCli = async ({
|
|||||||
/* eslint-disable object-property-newline */
|
/* eslint-disable object-property-newline */
|
||||||
return nodeRsyncPromise({
|
return nodeRsyncPromise({
|
||||||
...defaultOptions,
|
...defaultOptions,
|
||||||
src: source, dest: rsyncServer, excludeFirst: exclude, port: remotePort,
|
src: source, dest: rsyncServer, excludeFirst: exclude, includeFirst: include, port: remotePort,
|
||||||
privateKey: privateKeyPath, args, sshCmdArgs
|
privateKey: privateKeyPath, args, sshCmdArgs
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user