@taole/deploy-helper 0.5.3 → 0.5.4
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 +16 -7
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -56,6 +56,14 @@ async function initConfigJson() {
|
|
|
56
56
|
},
|
|
57
57
|
"testSync": {
|
|
58
58
|
"dist/index.html": "events/CHANGE_ME.htm"
|
|
59
|
+
},
|
|
60
|
+
"prodPipeline":{
|
|
61
|
+
"pipelines": [
|
|
62
|
+
{
|
|
63
|
+
"name": "OfficialSite OR SOMEOTHER",
|
|
64
|
+
"waitResult": true
|
|
65
|
+
}
|
|
66
|
+
]
|
|
59
67
|
}
|
|
60
68
|
}`;
|
|
61
69
|
fs.writeFileSync(configJsonPath, content, { encoding: "utf-8" });
|
|
@@ -73,14 +81,15 @@ async function getScpClient() {
|
|
|
73
81
|
const scpClientConfig = {
|
|
74
82
|
host: TEST_SERVER_HOST,
|
|
75
83
|
username: 'root',
|
|
76
|
-
tryKeyboard:
|
|
77
|
-
|
|
78
|
-
const sshKeyPath = join(homedir(), ".ssh/id_rsa");
|
|
79
|
-
if (fs.existsSync(sshKeyPath)) {
|
|
80
|
-
scpClientConfig.privateKey = fs.readFileSync(sshKeyPath, "utf-8");
|
|
81
|
-
} else {
|
|
82
|
-
log(`${sshKeyPath}不存在, 建议配置本机ssh免密登录, 参考地址:https://foochane.cn/article/2019061601.html`);
|
|
84
|
+
tryKeyboard: false,
|
|
85
|
+
password: 'tuwan123!@#',
|
|
83
86
|
}
|
|
87
|
+
// const sshKeyPath = join(homedir(), ".ssh/id_rsa");
|
|
88
|
+
// if (fs.existsSync(sshKeyPath)) {
|
|
89
|
+
// scpClientConfig.privateKey = fs.readFileSync(sshKeyPath, "utf-8");
|
|
90
|
+
// } else {
|
|
91
|
+
// log(`${sshKeyPath}不存在, 建议配置本机ssh免密登录, 参考地址:https://foochane.cn/article/2019061601.html`);
|
|
92
|
+
// }
|
|
84
93
|
scpClient = await Client(scpClientConfig);
|
|
85
94
|
return scpClient;
|
|
86
95
|
}
|