cloudcc-cli 0.8.5 → 0.8.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,31 @@
1
+ # ReleaseV0.8.9
2
+ #### 发布日期:2021-11-26
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 修复
6
+ * 无法识别uat环境
7
+
8
+ # ReleaseV0.8.8
9
+ #### 发布日期:2021-11-26
10
+ #### 发布范围:全量
11
+ #### 发布内容
12
+ * 优化
13
+ * 优化获取tag索引
14
+
15
+ # ReleaseV0.8.7
16
+ #### 发布日期:2021-11-26
17
+ #### 发布范围:全量
18
+ #### 发布内容
19
+ * 优化
20
+ * 优化打tag顺序
21
+
22
+ # ReleaseV0.8.6
23
+ #### 发布日期:2021-11-26
24
+ #### 发布范围:全量
25
+ #### 发布内容
26
+ * 优化
27
+ * 更新查询tag命令
28
+
1
29
  # ReleaseV0.8.5
2
30
  #### 发布日期:2021-11-25
3
31
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "0.8.5",
3
+ "version": "0.8.9",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -34,6 +34,9 @@ class Publish {
34
34
  let condition = await askType();
35
35
  // 获得version
36
36
  let version = getNewVersionName([condition.type])
37
+ console.log();
38
+ console.log(chalk.green('待发布版本:' + version));
39
+ console.log();
37
40
  if (await this.build()) {
38
41
  // 将readme生成为html,并复制到dist中
39
42
  let outPath = "dist"
@@ -8,7 +8,7 @@
8
8
  const updateSecond = ["Release", "GA"];
9
9
 
10
10
  // 需要更新第三位
11
- const updateLast = ["Dev", "uat", "RC"];
11
+ const updateLast = ["Dev", "Beta", "RC"];
12
12
 
13
13
  function change(version, type) {
14
14
  if (version) {
package/utils/pushCode.js CHANGED
@@ -83,12 +83,13 @@ function setTag(types, versions) {
83
83
  versions.map((version) => {
84
84
  exec("git tag " + version + " -f")
85
85
  })
86
+
86
87
  types.map((type) => {
87
88
  exec("git tag " + type + " -f")
88
89
  })
89
-
90
90
  // 推送tag
91
- exec("git push origin --tags")
91
+ exec("git push --tags")
92
+
92
93
  console.log(chalk.green('Tag设置成功!'));
93
94
  console.log();
94
95
  return true;
@@ -102,13 +103,18 @@ function getNewVersionName(types) {
102
103
  exec("git fetch --tags -f")
103
104
  return types.map((item) => {
104
105
  // 更新本地tag
105
- let version = exec(`git log --oneline --tags -1`)
106
+ let version = exec(`git tag --sort=-committerdate`)
106
107
  version = version.toString("utf8").trim();
107
108
  if (version) {
109
+ // 获取第一个版本号
110
+ version = version.split("\n")[1]
111
+ console.log("version 1", version);
108
112
  // 取版本号
109
113
  version = version.split("-V")[1]
114
+ console.log("version 2", version);
110
115
  // 改变版本号
111
116
  version = changeVersion.change(version, item)
117
+ console.log("version 3", version);
112
118
  // 生成最后的版本号
113
119
  item = item + "-V" + version
114
120
  } else {
@@ -124,9 +130,7 @@ function getNewVersionName(types) {
124
130
  */
125
131
  function pushCodeAndTags(types = []) {
126
132
  let versions = getNewVersionName(types);
127
- console.log();
128
- console.log(chalk.green('待发布版本:' + versions));
129
- console.log();
133
+
130
134
  return push(versions[0]) && setTag(types, versions)
131
135
  }
132
136
  module.exports = { pushCodeAndTags, push, getNewVersionName, setTag }