@taole/deploy-helper 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +4 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { join, basename, dirname } from "path";
|
|
|
6
6
|
import { simpleGit } from 'simple-git';
|
|
7
7
|
import { homedir } from 'os'
|
|
8
8
|
|
|
9
|
+
const TEST_SERVER_HOST = "192.168.0.35";
|
|
9
10
|
/**
|
|
10
11
|
* 加载配置
|
|
11
12
|
* @returns 配置对象
|
|
@@ -62,7 +63,7 @@ async function getScpClient() {
|
|
|
62
63
|
let scpClient = null;
|
|
63
64
|
// 不能放密码。。残念
|
|
64
65
|
const scpClientConfig = {
|
|
65
|
-
host:
|
|
66
|
+
host: TEST_SERVER_HOST,
|
|
66
67
|
username: 'root',
|
|
67
68
|
tryKeyboard: true,
|
|
68
69
|
}
|
|
@@ -134,7 +135,7 @@ async function main() {
|
|
|
134
135
|
const destPath = "/home/web/website/tuwan_www/templets/static/play/" + (command === 'scp' ? '' : 'events/') + dest;
|
|
135
136
|
|
|
136
137
|
const scpClient = await getScpClient();
|
|
137
|
-
console.log(`scp: ${srcFilePath} -> ${destPath}`);
|
|
138
|
+
console.log(`scp: ${srcFilePath} -> ${TEST_SERVER_HOST}:${destPath}`);
|
|
138
139
|
await scpClient.uploadFile(srcFilePath, destPath);
|
|
139
140
|
console.log(`scp done.`);
|
|
140
141
|
process.exit(0);
|
|
@@ -321,7 +322,7 @@ async function main() {
|
|
|
321
322
|
for (const [src, dest] of Object.entries(syncTestFiles)) {
|
|
322
323
|
const srcPath = join(workDir, src);
|
|
323
324
|
const destPath = "/home/web/website/tuwan_www/templets/static/play/" + dest;
|
|
324
|
-
console.log(`scp: ${srcPath} -> ${destPath}`);
|
|
325
|
+
console.log(`scp: ${srcPath} -> ${TEST_SERVER_HOST}:${destPath}`);
|
|
325
326
|
await scpClient.uploadFile(srcPath, destPath)
|
|
326
327
|
}
|
|
327
328
|
}
|