cloudcc-cli 1.4.3 → 1.4.5
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/README.md +14 -0
- package/package.json +1 -1
- package/src/builderPlugin.js +3 -1
- package/src/publishProjectH5.js +39 -4
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# ReleaseV1.4.5
|
|
2
|
+
#### 发布日期:2023-8-2
|
|
3
|
+
#### 发布范围:全量
|
|
4
|
+
#### 发布内容
|
|
5
|
+
* 修复
|
|
6
|
+
* 修复H5打包不创建version问题。
|
|
7
|
+
|
|
8
|
+
# ReleaseV1.4.4
|
|
9
|
+
#### 发布日期:2023-8-2
|
|
10
|
+
#### 发布范围:全量
|
|
11
|
+
#### 发布内容
|
|
12
|
+
* 迭代
|
|
13
|
+
* 组件发布支持设置组件加载模式:按需加载(lazy),启动加载(start)。
|
|
14
|
+
|
|
1
15
|
# ReleaseV1.4.3
|
|
2
16
|
#### 发布日期:2023-6-5
|
|
3
17
|
#### 发布范围:全量
|
package/package.json
CHANGED
package/src/builderPlugin.js
CHANGED
|
@@ -109,7 +109,8 @@ class Builder {
|
|
|
109
109
|
let bizType = data.componentInfo.bizType // 组件类型
|
|
110
110
|
let compDesc = data.componentInfo.compDesc // 组件描述
|
|
111
111
|
let category = data.componentInfo.category // 组件状态
|
|
112
|
-
|
|
112
|
+
let loadModel = data.componentInfo.loadModel // 组件加载模式,按需加载(lazy),启动加载(start)。
|
|
113
|
+
return { compName, component, vueContent, vueData, bizType, compDesc, category, loadModel }
|
|
113
114
|
};
|
|
114
115
|
/**
|
|
115
116
|
* 生成依赖文件
|
|
@@ -169,6 +170,7 @@ class Builder {
|
|
|
169
170
|
"bizType": obj.bizType,
|
|
170
171
|
"compDesc": obj.compDesc,
|
|
171
172
|
"category": obj.category,
|
|
173
|
+
"loadModel": obj.loadModel || "lazy",
|
|
172
174
|
"belongOrgFlag": this.options.devConsoleConfig.belongOrgFlag || "custom" //belongOrgFlag: 所属单位标识,std:官方的组件(神州云动);custom:第三方的组件
|
|
173
175
|
}
|
|
174
176
|
// 服务名
|
package/src/publishProjectH5.js
CHANGED
|
@@ -71,6 +71,43 @@ class Publish {
|
|
|
71
71
|
* 编译成功
|
|
72
72
|
*/
|
|
73
73
|
buildSucess(condition, version) {
|
|
74
|
+
// 更新日志文档添加发布日期
|
|
75
|
+
// 获得分支信息
|
|
76
|
+
let branch = execSync('git branch --show-current');
|
|
77
|
+
branch = branch.toString("utf8").trim();
|
|
78
|
+
const datas = fs.readFileSync("README.md", 'utf-8').split("\n")
|
|
79
|
+
let data = ""
|
|
80
|
+
datas.map((item, index) => {
|
|
81
|
+
if (0 == index) {
|
|
82
|
+
data = data + `#### 发布版本:${version}` + "\n"
|
|
83
|
+
data = data + `#### 发布时间:${dayjs().format('YYYY-MM-DD HH:mm:ss')}` + "\n"
|
|
84
|
+
data = data + `#### 发布人员:${this.user}` + "\n"
|
|
85
|
+
data = data + `#### 发布分支:${branch}` + "\n"
|
|
86
|
+
data = data + `#### 发布标签:${condition.type}` + "\n"
|
|
87
|
+
if (!item.startsWith("#### 发布版本")) {
|
|
88
|
+
data = data + item + "\n"
|
|
89
|
+
}
|
|
90
|
+
} else if (1 == index) {
|
|
91
|
+
if (!item.startsWith("#### 发布时间")) {
|
|
92
|
+
data = data + item + "\n"
|
|
93
|
+
}
|
|
94
|
+
} else if (2 == index) {
|
|
95
|
+
if (!item.startsWith("#### 发布人员")) {
|
|
96
|
+
data = data + item + "\n"
|
|
97
|
+
}
|
|
98
|
+
} else if (3 == index) {
|
|
99
|
+
if (!item.startsWith("#### 发布分支")) {
|
|
100
|
+
data = data + item + "\n"
|
|
101
|
+
}
|
|
102
|
+
} else if (4 == index) {
|
|
103
|
+
if (!item.startsWith("#### 发布标签")) {
|
|
104
|
+
data = data + item + "\n"
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
data = data + item + "\n"
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
fs.writeFileSync("README.md", data)
|
|
74
111
|
// 5:将readme生成为html,并复制到dist中
|
|
75
112
|
let outPath = "dist"
|
|
76
113
|
// 读取配置,是否改变了输出路径
|
|
@@ -92,7 +129,7 @@ class Publish {
|
|
|
92
129
|
}
|
|
93
130
|
|
|
94
131
|
// 7:发布代码并设置tags,触发发布,飞书提醒
|
|
95
|
-
if (pushCodeAndTags([condition.type], this.args.get("update"))) {
|
|
132
|
+
if (pushCodeAndTags(version, [condition.type], this.args.get("update"))) {
|
|
96
133
|
if (projectConfig && projectConfig.config) {
|
|
97
134
|
jenkins(projectConfig.config["jenkins-" + condition.type])
|
|
98
135
|
}
|
|
@@ -180,6 +217,4 @@ class Publish {
|
|
|
180
217
|
};
|
|
181
218
|
}
|
|
182
219
|
|
|
183
|
-
module.exports = Publish;
|
|
184
|
-
|
|
185
|
-
|
|
220
|
+
module.exports = Publish;
|