cloudcc-cli 0.3.8 → 0.4.3
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 +29 -3
- package/package.json +2 -2
- package/src/publish.js +22 -5
package/README.md
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# ReleaseV0.4.3
|
|
2
|
+
#### 发布日期:2021-10-8
|
|
3
|
+
#### 发布范围:全量
|
|
4
|
+
#### 发布内容
|
|
5
|
+
* 功能迭代:修复打包指令
|
|
6
|
+
|
|
7
|
+
# ReleaseV0.4.2
|
|
8
|
+
#### 发布日期:2021-10-14
|
|
9
|
+
#### 发布范围:全量
|
|
10
|
+
#### 发布内容
|
|
11
|
+
* 功能迭代:优化npm打包命令
|
|
12
|
+
|
|
13
|
+
# ReleaseV0.4.1
|
|
14
|
+
#### 发布日期:2021-10-8
|
|
15
|
+
#### 发布范围:全量
|
|
16
|
+
#### 发布内容
|
|
17
|
+
* 功能迭代:更新npm到https
|
|
18
|
+
|
|
19
|
+
# ReleaseV0.4.0
|
|
20
|
+
#### 发布日期:2021-9-29
|
|
21
|
+
#### 发布范围:全量
|
|
22
|
+
#### 发布内容
|
|
23
|
+
* 功能迭代:移除Version.json,直接将版本信息写入Version.vue
|
|
24
|
+
|
|
25
|
+
# ReleaseV0.3.9
|
|
26
|
+
#### 发布日期:2021-9-29
|
|
27
|
+
#### 发布范围:全量
|
|
28
|
+
#### 发布内容
|
|
29
|
+
* 功能迭代:使用version.json控制发布版本信息
|
|
4
30
|
|
|
5
31
|
# ReleaseV0.3.8
|
|
6
32
|
#### 发布日期:2021-9-29
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcc-cli",
|
|
3
|
-
"version": "0.3
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "cloudcc-cli",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudcc",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"cloudccBuildCCSDK": "bin/buildccsdk.js"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"publish-lib": "npm publish --registry
|
|
20
|
+
"publish-lib": "npm publish --registry https://registry.npmjs.org"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"axios": "^0.21.1",
|
package/src/publish.js
CHANGED
|
@@ -121,13 +121,25 @@ class Publish {
|
|
|
121
121
|
* @param {版本信息} version
|
|
122
122
|
*/
|
|
123
123
|
writeVersion(version) {
|
|
124
|
+
// 获得分支信息
|
|
124
125
|
let branch = exec('git rev-parse --abbrev-ref HEAD');
|
|
125
126
|
branch = branch.toString("utf8").trim();
|
|
127
|
+
// 获得提交版本信息
|
|
128
|
+
var gitHEAD = fs.readFileSync('.git/HEAD', 'utf-8').trim()
|
|
129
|
+
var ref = gitHEAD.split(': ')[1]
|
|
130
|
+
var develop = gitHEAD.split('/')[2]
|
|
131
|
+
var gitVersion = fs.readFileSync('.git/' + ref, 'utf-8').trim()
|
|
132
|
+
var gitCommitVersion = '"' + develop + ': ' + gitVersion + '"'
|
|
126
133
|
|
|
127
|
-
let
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
let versionInfo =
|
|
135
|
+
`<template>
|
|
136
|
+
<div style="font-size: 20px">
|
|
137
|
+
<div>分支:${branch}</div>
|
|
138
|
+
<div>版本号:${version}</div>
|
|
139
|
+
<div>Commit:${gitCommitVersion}</div>
|
|
140
|
+
</div>
|
|
141
|
+
</template>`
|
|
142
|
+
fs.writeFileSync("src/views/version.vue", versionInfo);
|
|
131
143
|
};
|
|
132
144
|
/**
|
|
133
145
|
* 发布代码
|
|
@@ -139,7 +151,12 @@ class Publish {
|
|
|
139
151
|
try {
|
|
140
152
|
console.log(chalk.green('开始编译,请稍后...'));
|
|
141
153
|
// 打包命令
|
|
142
|
-
|
|
154
|
+
try {
|
|
155
|
+
exec('npm run build');
|
|
156
|
+
} catch (error) {
|
|
157
|
+
console.log(chalk.red('请提供build打包命令'));
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
143
160
|
|
|
144
161
|
console.log(chalk.green('编译成功!'));
|
|
145
162
|
console.log();
|