cloudcc-cli 1.4.6 → 1.4.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/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ # ReleaseV1.4.7
2
+ #### 发布日期:2023-8-3
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 迭代
6
+ * 优化H5打包生成的version问题
7
+
1
8
  # ReleaseV1.4.6
2
9
  #### 发布日期:2023-8-3
3
10
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -123,7 +123,7 @@ class Publish {
123
123
 
124
124
  try {
125
125
  // 6:写入版本信息
126
- this.writeVersion(version, outPath);
126
+ this.writeVersion(version, outPath, condition.type);
127
127
  } catch (error) {
128
128
  console.log(chalk.red("版本信息写入异常:" + error))
129
129
  }
@@ -166,22 +166,15 @@ class Publish {
166
166
  })
167
167
  }
168
168
  /**
169
- * 将版本信息写入文件
170
- * @param {版本信息} version
171
- * @param {输出路径} outPath
172
- */
173
- writeVersion(version, outPath = "dist") {
169
+ * 将版本信息写入文件
170
+ * @param {版本信息} version
171
+ * @param {输出路径} outPath
172
+ */
173
+ writeVersion(version, outPath, type) {
174
174
  try {
175
175
  // 获得分支信息
176
176
  let branch = execSync('git branch --show-current');
177
177
  branch = branch.toString("utf8").trim();
178
- // 获得提交版本信息
179
- var gitHEAD = fs.readFileSync('.git/HEAD', 'utf-8').trim()
180
- var ref = gitHEAD.split(': ')[1]
181
- var develop = gitHEAD.split('/')[2]
182
- var gitVersion = fs.readFileSync('.git/' + ref, 'utf-8').trim()
183
- var gitCommitVersion = '"' + develop + ': ' + gitVersion + '"'
184
-
185
178
  let versionInfo =
186
179
  `
187
180
  <!DOCTYPE html>