@taole/deploy-helper 1.0.0-beta.0 → 1.0.0-beta.1
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/deploy.mjs +1 -4
- package/deploy2.mjs +1 -4
- package/index.mjs +2 -3
- package/package.json +1 -1
package/deploy.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { simpleGit } from 'simple-git';
|
|
|
5
5
|
import { getScpClient, TEST_SERVER_HOST } from './util.mjs';
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class Deployer {
|
|
8
|
+
export default class Deployer {
|
|
9
9
|
async deploy(workDir, mode, config) {
|
|
10
10
|
// 检查配置中是否存在默认值(CHANGE_ME)
|
|
11
11
|
const result = hasChangeMe(JSON.stringify(config));
|
|
@@ -199,6 +199,3 @@ class Deployer {
|
|
|
199
199
|
await runPipeline(config, mode);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
export default new Deployer();
|
package/deploy2.mjs
CHANGED
package/index.mjs
CHANGED
|
@@ -78,11 +78,10 @@ async function getVersion() {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
function getDeployer(){
|
|
81
|
+
function getDeployer() {
|
|
82
82
|
return new Deployer();
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
86
85
|
async function main() {
|
|
87
86
|
const version = await getVersion();
|
|
88
87
|
|
|
@@ -179,9 +178,9 @@ async function main() {
|
|
|
179
178
|
const mode = process.argv[2] === 'prod' ? 'prod' : 'test'; // 部署环境
|
|
180
179
|
log(`deploy mode: ${mode}`);
|
|
181
180
|
log(`workDir: ${workDir}`);
|
|
181
|
+
const deployer = getDeployer();
|
|
182
182
|
|
|
183
183
|
const config = await loadConfig();
|
|
184
|
-
const deployer = getDeployer();
|
|
185
184
|
await deployer.deploy(workDir, mode, config);
|
|
186
185
|
log(`deploy-helper deploy done.`);
|
|
187
186
|
process.exit(0);
|