mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2025-06-22 04:22:10 +10:00
update helpers
This commit is contained in:
parent
1b6513031e
commit
7306f6bca0
5 changed files with 23 additions and 23 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
const { sshDeploy } = require('./rsyncCli');
|
||||
const { remoteCmdBefore, remoteCmdAfter } = require('./remoteCmd');
|
||||
const { addSshKey } = require('./sshKey');
|
||||
const { addSshKey, getPrivateKeyPath } = require('./sshKey');
|
||||
const { validateRequiredInputs } = require('./helpers');
|
||||
const inputs = require('./inputs');
|
||||
|
||||
|
@ -16,7 +16,8 @@ const run = () => {
|
|||
// Validate required inputs
|
||||
validateRequiredInputs({ sshPrivateKey, remoteHost, remoteUser });
|
||||
// Add SSH key
|
||||
const privateKey = addSshKey(sshPrivateKey, deployKeyName);
|
||||
addSshKey(sshPrivateKey, deployKeyName);
|
||||
const { path: privateKeyPath } = getPrivateKeyPath(deployKeyName);
|
||||
// Check Script before
|
||||
if (scriptBefore) {
|
||||
remoteCmdBefore(scriptBefore);
|
||||
|
@ -31,7 +32,7 @@ const run = () => {
|
|||
/* eslint-disable object-property-newline */
|
||||
sshDeploy({
|
||||
source, rsyncServer, exclude, remotePort,
|
||||
privateKey, args, sshCmdArgs, callback
|
||||
privateKeyPath, args, sshCmdArgs, callback
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue