cloudcc-cli 0.9.0 → 0.9.1

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
+ # ReleaseV0.9.1
2
+ #### 发布日期:2021-11-29
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 优化
6
+ * 优化获取版本号逻辑
7
+
1
8
  # ReleaseV0.9.0
2
9
  #### 发布日期:2021-11-26
3
10
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
package/test/test.js CHANGED
@@ -1,4 +1,6 @@
1
-
2
- const dayjs = require("dayjs")
3
-
4
- console.log(dayjs().format('YYYY-MM-DD HH:mm:ss'));
1
+ let versions = ["A-V", "bbbb-V", "B", "C", "D"]
2
+ let version;
3
+ version = versions.find((item) => {
4
+ return item.includes("-V");
5
+ })
6
+ console.log(version);
package/utils/pushCode.js CHANGED
@@ -106,8 +106,12 @@ function getNewVersionName(types) {
106
106
  let version = exec(`git tag --sort=-committerdate`)
107
107
  version = version.toString("utf8").trim();
108
108
  if (version) {
109
- // 获取第一个版本号
110
- version = version.split("\n")[1]
109
+ // 使用换行分隔下
110
+ let versions = version.split("\n");
111
+ // 取出第一个包含-V的版本号
112
+ version = versions.find((item) => {
113
+ return item.includes("-V");
114
+ })
111
115
  console.log("version 1", version);
112
116
  // 取版本号
113
117
  version = version.split("-V")[1]