cloudcc-cli 1.1.5 → 1.1.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/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ # ReleaseV1.1.6
2
+ #### 发布日期:2022-7-11
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 修复
6
+ * 优化云打包
7
+
1
8
  # ReleaseV1.1.5
2
9
  #### 发布日期:2022-7-7
3
10
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -33,12 +33,16 @@ class Publish {
33
33
  * branch:使用的分支
34
34
  * language:是否更新多语言,'1'更新,'0'不更新
35
35
  * buildType:打包方式,online-云打包,local-本地打包
36
+ * user:打包用户
36
37
  */
37
38
  this.args = new Map();
38
39
  this.arguments = process.argv.splice(2).map((item) => {
39
40
  let arr = item.split("=");
40
41
  this.args.set(arr[0], arr[1]);
41
42
  });
43
+ this.user = this.args.get("user") || exec("git config user.name").toString("utf8").trim();
44
+ console.log(this.args);
45
+
42
46
  }
43
47
  /**
44
48
  * 初始化
@@ -68,7 +72,7 @@ class Publish {
68
72
  buildType = await askBuildType();
69
73
  }
70
74
  if ("online" == buildType.buildType) {
71
- deploy(projectConfig.config?.["deploy-" + condition.type])
75
+ deploy(projectConfig.config?.["deploy-" + condition.type]+ "," + encodeURI(this.user))
72
76
  console.log(chalk.green("云发布已开始,请稍后查看通知"))
73
77
  return
74
78
  }
@@ -135,8 +139,8 @@ class Publish {
135
139
  if (projectConfig && projectConfig.config) {
136
140
  jenkins(projectConfig.config["jenkins-" + condition.type])
137
141
  }
138
- notifyFeishu(condition.type, version, projectConfig)
139
- notifyDingDing(condition.type, version, projectConfig)
142
+ notifyFeishu(condition.type, version, projectConfig, this.user)
143
+ notifyDingDing(condition.type, version, projectConfig, this.user)
140
144
  console.log();
141
145
  console.log(chalk.green('发布完成'));
142
146
  console.log();
@@ -209,7 +213,7 @@ class Publish {
209
213
  <div>版本号:${version}</div>
210
214
  <div>提交Hash:${gitCommitVersion}</div>
211
215
  <div>发布时间:${dayjs().format('YYYY-MM-DD HH:mm:ss')}</div>
212
- <div>发布人员:${exec("git config user.name").toString("utf8").trim()}</div>
216
+ <div>发布人员:${this.user}</div>
213
217
  </div>
214
218
  </div>
215
219
  </body>
package/utils/notifyIM.js CHANGED
@@ -12,13 +12,13 @@ module.exports = {
12
12
  /**
13
13
  * 通知钉钉群
14
14
  */
15
- notifyDingDing: (type, version, projectConfig) => {
15
+ notifyDingDing: (type, version, projectConfig, user) => {
16
16
  if (projectConfig && projectConfig.config) {
17
17
  let body = {
18
18
  "msgtype": "actionCard",
19
19
  "actionCard": {
20
20
  "title": `${projectConfig.name}项目发布通知`,
21
- "text": `${projectConfig.name}项目发布通知` + "\n\n 项&nbsp;&nbsp;目&nbsp;&nbsp;名:" + projectConfig.name + "\n\n分&nbsp;&nbsp;支&nbsp;&nbsp;名:" + exec("git rev-parse --abbrev-ref HEAD").toString("utf8").trim() + "\n\nTag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:" + type + "\n\n版&nbsp;&nbsp;本&nbsp;&nbsp;号:" + version + "\n\n发&nbsp;&nbsp;布&nbsp;&nbsp;者:" + exec("git config user.name").toString("utf8").trim(),
21
+ "text": `${projectConfig.name}项目发布通知` + "\n\n 项&nbsp;&nbsp;目&nbsp;&nbsp;名:" + projectConfig.name + "\n\n分&nbsp;&nbsp;支&nbsp;&nbsp;名:" + exec("git rev-parse --abbrev-ref HEAD").toString("utf8").trim() + "\n\nTag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:" + type + "\n\n版&nbsp;&nbsp;本&nbsp;&nbsp;号:" + version + "\n\n发&nbsp;&nbsp;布&nbsp;&nbsp;者:" + user,
22
22
  "btnOrientation": "1",
23
23
  "btns": [
24
24
  {
@@ -41,7 +41,7 @@ module.exports = {
41
41
  /**
42
42
  * 通知飞书群
43
43
  */
44
- notifyFeishu: (type, version, projectConfig) => {
44
+ notifyFeishu: (type, version, projectConfig, user) => {
45
45
  if (projectConfig && projectConfig.config) {
46
46
  let body = {
47
47
  "msg_type": "interactive",
@@ -52,7 +52,7 @@ module.exports = {
52
52
  },
53
53
  "elements": [{
54
54
  "tag": "markdown",
55
- "content": "项目名称:" + projectConfig.name + "\n分支:" + exec("git rev-parse --abbrev-ref HEAD").toString("utf8").trim() + "\nTag:" + type + "\n版本号:" + version + "\n发布者:" + exec("git config user.name").toString("utf8").trim()
55
+ "content": "项目名称:" + projectConfig.name + "\n分支:" + exec("git rev-parse --abbrev-ref HEAD").toString("utf8").trim() + "\nTag:" + type + "\n版本号:" + version + "\n发布者:" + user
56
56
  }, {
57
57
  "actions": [{
58
58
  "tag": "button",