@taole/deploy-helper 0.2.5 → 0.2.7
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -34,7 +34,7 @@ async function initConfigJson() {
|
|
|
34
34
|
"dest": "../Static_2025",
|
|
35
35
|
"commit": "feat:部署资源文件",
|
|
36
36
|
"files": {
|
|
37
|
-
"dist/assets": "CHANGE_ME"
|
|
37
|
+
"dist/assets": "CHANGE_ME"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"entry": {
|
|
@@ -81,7 +81,7 @@ async function main() {
|
|
|
81
81
|
const workDir = process.cwd(); // 当前项目根目录
|
|
82
82
|
const mode = process.argv[2] === 'prod' ? 'prod' : 'test'; // 部署环境
|
|
83
83
|
console.log(`deploy mode: ${mode}`);
|
|
84
|
-
console.log(`
|
|
84
|
+
console.log(`workDir: ${workDir}`);
|
|
85
85
|
|
|
86
86
|
// 读取配置
|
|
87
87
|
const config = await loadConfig();
|
|
@@ -100,7 +100,7 @@ async function main() {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
// 需要处理entry
|
|
103
|
-
const needHandleEntry =
|
|
103
|
+
const needHandleEntry = mode === 'prod' || (mode === 'test' && !config.entry.onlyProd);
|
|
104
104
|
const entryTestBranch = (config.entry && config.entry.testBranch) || "test";
|
|
105
105
|
const entryProdBranch = (config.entry && config.entry.prodBranch) || "master";
|
|
106
106
|
const entryTargetBranch = mode === 'prod' ? entryProdBranch : entryTestBranch;
|