@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.
Files changed (2) hide show
  1. package/index.mjs +4 -3
  2. 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: '192.168.0.35',
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/deploy-helper",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "脚本部署工具,用于将项目部署到测试环境或生产环境",
5
5
  "main": "index.mjs",
6
6
  "type": "module",