cloudcc-cli 0.8.5 → 0.8.6

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.8.6
2
+ #### 发布日期:2021-11-26
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 优化
6
+ * 更新查询tag命令
7
+
1
8
  # ReleaseV0.8.5
2
9
  #### 发布日期:2021-11-25
3
10
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
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"
package/utils/pushCode.js CHANGED
@@ -102,13 +102,18 @@ function getNewVersionName(types) {
102
102
  exec("git fetch --tags -f")
103
103
  return types.map((item) => {
104
104
  // 更新本地tag
105
- let version = exec(`git log --oneline --tags -1`)
105
+ let version = exec(`git tag --sort=-committerdate`)
106
106
  version = version.toString("utf8").trim();
107
107
  if (version) {
108
+ // 获取第一个版本号
109
+ version = version.split("\n")[0]
110
+ console.log("version 1", version);
108
111
  // 取版本号
109
112
  version = version.split("-V")[1]
113
+ console.log("version 2", version);
110
114
  // 改变版本号
111
115
  version = changeVersion.change(version, item)
116
+ console.log("version 3", version);
112
117
  // 生成最后的版本号
113
118
  item = item + "-V" + version
114
119
  } else {
@@ -124,9 +129,7 @@ function getNewVersionName(types) {
124
129
  */
125
130
  function pushCodeAndTags(types = []) {
126
131
  let versions = getNewVersionName(types);
127
- console.log();
128
- console.log(chalk.green('待发布版本:' + versions));
129
- console.log();
132
+
130
133
  return push(versions[0]) && setTag(types, versions)
131
134
  }
132
135
  module.exports = { pushCodeAndTags, push, getNewVersionName, setTag }