diff --git a/deploy.js b/deploy.js index 401d970..7d0900f 100644 --- a/deploy.js +++ b/deploy.js @@ -10,7 +10,7 @@ const wo = { global.wo = { envi: { deploy: { fromDist: './dist', - toTarget: 'github', + gotoTarget: 'github', vultr: { targetType: 'ssh', @@ -46,15 +46,15 @@ try { } catch (err) { console.error('Loading config files failed: ' + err.message) } -wo.envi.deploy.connection = wo.envi.deploy[wo.envi.deploy.toTarget] +wo.envi.deploy.connection = wo.envi.deploy[wo.envi.deploy.gotoTarget] // 读取命令行参数 commander .version('1.0', '-v, --version') // 默认是 -V。如果要 -v,就要加 '-v --version' .option('-f, --fromDist ', `local distribution path to copy from. Default to ${wo.envi.deploy.fromDist}`) - .option('-t, --toTarget ', `connection section in config. Default to ${wo.envi.deploy.toTarget}`) + .option('-g, --gotoTarget ', `connection section in config. Default to ${wo.envi.deploy.gotoTarget}`) - .option('-T, --targetType ', `target type, git or ssh. Default to ${wo.envi.deploy.connection.targetType}`) + .option('-t, --targetType ', `target type, git or ssh. Default to ${wo.envi.deploy.connection.targetType}`) .option('-H, --host ', `Host IP or domain name of the target server. Default to ${wo.envi.deploy.connection.host}`) .option('-P, --port ', `Ssh port number of the target server. Default to ${wo.envi.deploy.connection.port}`) @@ -64,7 +64,7 @@ commander .option('-r, --repo ', `git repo address. Default to ${wo.envi.deploy.connection.repo}`) .option('-b, --branch ', `git repo branch. Default to ${wo.envi.deploy.connection.branch}`) .option('-n, --gitname ', `git user name. Default to ${wo.envi.deploy.connection.gitname}`) - .option('-e, --gitemail ', `git user email. Default to ${wo.envi.deploy.connection.gitemail}`) + .option('-m, --gitemail ', `git user email. Default to ${wo.envi.deploy.connection.gitemail}`) .option('-u, --user ', `User id to login the target server. Default to ${wo.envi.deploy.connection.user}`) .option('-k, --key ', `User private key file to login the target server. Default to ${wo.envi.deploy.connection.key}`) @@ -73,7 +73,7 @@ commander wo.envi.deploy.fromDist = commander.fromDist || wo.envi.deploy.fromDist -wo.envi.deploy.connection = wo.envi.deploy[commander.toTarget || wo.envi.deploy.toTarget] // 使用用户指定的连接 +wo.envi.deploy.connection = wo.envi.deploy[commander.gotoTarget || wo.envi.deploy.gotoTarget] // 使用用户指定的连接 // 可以用命令行参数覆盖掉配置文件 const connection = { targetType: commander.targetType || wo.envi.deploy.connection.targetType,