cloudcc-cli 0.8.7 → 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,31 @@
1
+ # ReleaseV0.9.1
2
+ #### 发布日期:2021-11-29
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 优化
6
+ * 优化获取版本号逻辑
7
+
8
+ # ReleaseV0.9.0
9
+ #### 发布日期:2021-11-26
10
+ #### 发布范围:全量
11
+ #### 发布内容
12
+ * 迭代
13
+ * GA移除大版本升级
14
+
15
+ # ReleaseV0.8.9
16
+ #### 发布日期:2021-11-26
17
+ #### 发布范围:全量
18
+ #### 发布内容
19
+ * 修复
20
+ * 无法识别uat环境
21
+
22
+ # ReleaseV0.8.8
23
+ #### 发布日期:2021-11-26
24
+ #### 发布范围:全量
25
+ #### 发布内容
26
+ * 优化
27
+ * 优化获取tag索引
28
+
1
29
  # ReleaseV0.8.7
2
30
  #### 发布日期:2021-11-26
3
31
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "0.8.7",
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);
@@ -5,10 +5,10 @@
5
5
  * @returns 新的版本号
6
6
  */
7
7
  // 需要更新第二位
8
- const updateSecond = ["Release", "GA"];
8
+ const updateSecond = ["Release"];
9
9
 
10
10
  // 需要更新第三位
11
- const updateLast = ["Dev", "uat", "RC"];
11
+ const updateLast = ["Dev", "Beta", "GA", "RC"];
12
12
 
13
13
  function change(version, type) {
14
14
  if (version) {
package/utils/pushCode.js CHANGED
@@ -79,18 +79,17 @@ function setTag(types, versions) {
79
79
  }
80
80
  })
81
81
 
82
- // 添加tag,必须先设置不带版本号的tag,否则会报错
83
- types.map((type) => {
84
- exec("git tag " + type + " -f")
85
- })
86
-
82
+ // 添加tag
87
83
  versions.map((version) => {
88
84
  exec("git tag " + version + " -f")
89
85
  })
90
86
 
91
-
87
+ types.map((type) => {
88
+ exec("git tag " + type + " -f")
89
+ })
92
90
  // 推送tag
93
- exec("git push origin --tags")
91
+ exec("git push --tags")
92
+
94
93
  console.log(chalk.green('Tag设置成功!'));
95
94
  console.log();
96
95
  return true;
@@ -107,8 +106,12 @@ function getNewVersionName(types) {
107
106
  let version = exec(`git tag --sort=-committerdate`)
108
107
  version = version.toString("utf8").trim();
109
108
  if (version) {
110
- // 获取第一个版本号
111
- version = version.split("\n")[0]
109
+ // 使用换行分隔下
110
+ let versions = version.split("\n");
111
+ // 取出第一个包含-V的版本号
112
+ version = versions.find((item) => {
113
+ return item.includes("-V");
114
+ })
112
115
  console.log("version 1", version);
113
116
  // 取版本号
114
117
  version = version.split("-V")[1]