cloudcc-cli 0.8.4 → 0.8.8
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 +28 -0
- package/package.json +1 -1
- package/src/publishProject.js +3 -0
- package/utils/changeVersion.js +2 -2
- package/utils/pushCode.js +10 -6
package/README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# ReleaseV0.8.8
|
|
2
|
+
#### 发布日期:2021-11-26
|
|
3
|
+
#### 发布范围:全量
|
|
4
|
+
#### 发布内容
|
|
5
|
+
* 优化
|
|
6
|
+
* 优化获取tag索引
|
|
7
|
+
|
|
8
|
+
# ReleaseV0.8.7
|
|
9
|
+
#### 发布日期:2021-11-26
|
|
10
|
+
#### 发布范围:全量
|
|
11
|
+
#### 发布内容
|
|
12
|
+
* 优化
|
|
13
|
+
* 优化打tag顺序
|
|
14
|
+
|
|
15
|
+
# ReleaseV0.8.6
|
|
16
|
+
#### 发布日期:2021-11-26
|
|
17
|
+
#### 发布范围:全量
|
|
18
|
+
#### 发布内容
|
|
19
|
+
* 优化
|
|
20
|
+
* 更新查询tag命令
|
|
21
|
+
|
|
22
|
+
# ReleaseV0.8.5
|
|
23
|
+
#### 发布日期:2021-11-25
|
|
24
|
+
#### 发布范围:全量
|
|
25
|
+
#### 发布内容
|
|
26
|
+
* 优化
|
|
27
|
+
* RC加入升级第二位version
|
|
28
|
+
|
|
1
29
|
# ReleaseV0.8.4
|
|
2
30
|
#### 发布日期:2021-11-25
|
|
3
31
|
#### 发布范围:全量
|
package/package.json
CHANGED
package/src/publishProject.js
CHANGED
|
@@ -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/changeVersion.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* @returns 新的版本号
|
|
6
6
|
*/
|
|
7
7
|
// 需要更新第二位
|
|
8
|
-
const updateSecond = ["Release"];
|
|
8
|
+
const updateSecond = ["Release", "GA"];
|
|
9
9
|
|
|
10
10
|
// 需要更新第三位
|
|
11
|
-
const updateLast = ["Dev", "uat", "
|
|
11
|
+
const updateLast = ["Dev", "uat", "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
|
|
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
|
|
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
|
-
|
|
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 }
|