cloudcc-cli 1.4.8 → 1.4.9

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,11 @@
1
+ # ReleaseV1.4.9
2
+ #### 发布日期:2023-8-23
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 迭代
6
+ * 打包生成版本信息的json文件,内容格式优化
7
+
8
+
1
9
  # ReleaseV1.4.8
2
10
  #### 发布日期:2023-8-23
3
11
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -103,6 +103,9 @@ class Publish {
103
103
  }
104
104
  // 4:开始打包
105
105
  this.build(condition)
106
+
107
+ // 7:写入版本信息
108
+ // writeVersion("sdf", condition.type, projectConfig, this.user);
106
109
  }
107
110
  }
108
111
 
@@ -9,7 +9,6 @@ const { execSync } = require('child_process');
9
9
  */
10
10
  module.exports = {
11
11
  writeVersion(version, type, projectConfig, user) {
12
- console.log("start")
13
12
  try {
14
13
  // 获得分支信息
15
14
  let branch = execSync('git branch --show-current');
@@ -44,10 +43,12 @@ module.exports = {
44
43
  fs.writeFileSync("dist/version.html", versionInfo, 'utf-8');
45
44
 
46
45
  let versionInfoJson =
47
- `{"projectName":"${projectConfig.name}","版本":"${version}","时间":"${dayjs().format('YYYY-MM-DD HH:mm:ss')}","人员":"${user}","分支":"${branch}","标签":"${type}"}`
48
- fs.writeFileSync("dist/version.json", versionInfoJson, 'utf-8');
46
+ `{"serviceName":"${projectConfig.name}","status":"OK","codeVersion":"${projectConfig.codeVersion + version}","serviceType":"${projectConfig.serviceType}"}`
47
+ fs.mkdirSync("dist/ccmonitor", { recursive: true });
48
+ fs.writeFileSync("dist/ccmonitor/sck", versionInfoJson, 'utf-8');
49
49
  return true
50
50
  } catch (error) {
51
+ console.log(error)
51
52
  return false
52
53
  }
53
54
  }