@taole/deploy-helper 0.5.5 → 0.5.6
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 +12 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -15,6 +15,14 @@ const __dirname = path.dirname(__filename);
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
const TEST_SERVER_HOST = "192.168.0.35";
|
|
18
|
+
|
|
19
|
+
function fmtAssetsCommit(msg){
|
|
20
|
+
if(msg.startsWith("-#")){
|
|
21
|
+
return msg;
|
|
22
|
+
}
|
|
23
|
+
return `-#DH-1 ${msg}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
/**
|
|
19
27
|
* 加载配置
|
|
20
28
|
* @returns 配置对象
|
|
@@ -355,7 +363,8 @@ async function main() {
|
|
|
355
363
|
if (!assetsStatus.isClean()) {
|
|
356
364
|
canPushAssets = true;
|
|
357
365
|
await assetsGit.add(".");
|
|
358
|
-
|
|
366
|
+
let assetsCommit = `${config.assets.commit || "feat:部署资源文件"} by deploy-helper`;
|
|
367
|
+
assetsCommit = fmtAssetsCommit(assetsCommit);
|
|
359
368
|
const assetsCommitResult = await assetsGit.commit(assetsCommit);
|
|
360
369
|
log(`assets commit: ${assetsCommit}`);
|
|
361
370
|
log(`assets commit: ${JSON.stringify(assetsCommitResult.summary)}`);
|
|
@@ -368,7 +377,8 @@ async function main() {
|
|
|
368
377
|
if (!entryStatus.isClean()) {
|
|
369
378
|
canPushEntry = true;
|
|
370
379
|
await entryGit.add(".");
|
|
371
|
-
|
|
380
|
+
let entryCommit = `${config.entry.commit || "feat:部署入口文件"} by deploy-helper`;
|
|
381
|
+
entryCommit = fmtAssetsCommit(entryCommit);
|
|
372
382
|
const entryCommitResult = await entryGit.commit(entryCommit);
|
|
373
383
|
log(`entry commit: ${entryCommit}`);
|
|
374
384
|
log(`entry commit: ${JSON.stringify(entryCommitResult.summary)}`);
|