cloudcc-cli 1.3.7 → 1.3.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 CHANGED
@@ -1,3 +1,11 @@
1
+ # ReleaseV1.3.8
2
+ #### 发布日期:2023-3-9
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 迭代
6
+ * 放开tag限制,任何tag都可以创建
7
+ * 优化
8
+
1
9
  # ReleaseV1.3.7
2
10
  #### 发布日期:2023-3-7
3
11
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -103,6 +103,44 @@ class Publish {
103
103
  this.build(condition)
104
104
  }
105
105
  }
106
+
107
+ /**
108
+ * 编译代码
109
+ * @param {发布类型} types:Dev,uat,Release,GA,RC
110
+ * @returns
111
+ */
112
+ build(condition) {
113
+ console.log(chalk.green('开始编译,请稍后...'));
114
+ console.log();
115
+ // 5:获取新的发布版本号
116
+ let version = getNewVersionName([condition.type])
117
+ // 5.1:将版本信息写入env文件中,公其他业务使用
118
+ try {
119
+ fs.writeFileSync(".env.production", "VUE_APP_PROJECT_VERSION = " + condition.type + "-" + version, 'utf-8')
120
+ } catch (error) {
121
+ }
122
+ let that = this;
123
+ // 打包命令
124
+ exec('npm run build', (error, stdout, stderr) => {
125
+ if (error) {
126
+ exec('npx vue-cli-service build', (error, stdout, stderr) => {
127
+ if (error) {
128
+ console.log('编译失败:', error);
129
+ console.log(chalk.red('编译失败:' + stdout));
130
+ } else {
131
+ console.log(chalk.green('编译成功!'));
132
+ console.log();
133
+ that.buildSucess(condition, version);
134
+ }
135
+ })
136
+ } else {
137
+ console.log(chalk.green('编译成功!'));
138
+ console.log();
139
+ that.buildSucess(condition, version);
140
+ }
141
+ })
142
+
143
+ }
106
144
  /**
107
145
  * 编译成功回调
108
146
  */
@@ -174,43 +212,7 @@ class Publish {
174
212
  console.log();
175
213
  }
176
214
  }
177
- /**
178
- * 编译代码
179
- * @param {发布类型} types:Dev,uat,Release,GA,RC
180
- * @returns
181
- */
182
- build(condition) {
183
- console.log(chalk.green('开始编译,请稍后...'));
184
- console.log();
185
- // 5:获取新的发布版本号
186
- let version = getNewVersionName([condition.type])
187
- // 5.1:将版本信息写入env文件中,公其他业务使用
188
- try {
189
- fs.writeFileSync(".env.production", "VUE_APP_PROJECT_VERSION = " + condition.type + "-" + version, 'utf-8')
190
- } catch (error) {
191
- }
192
- let that = this;
193
- // 打包命令
194
- exec('npm run build', (error, stdout, stderr) => {
195
- if (error) {
196
- exec('npx vue-cli-service build', (error, stdout, stderr) => {
197
- if (error) {
198
- console.log('编译失败:', error);
199
- console.log(chalk.red('编译失败:' + stdout));
200
- } else {
201
- console.log(chalk.green('编译成功!'));
202
- console.log();
203
- that.buildSucess(condition, version);
204
- }
205
- })
206
- } else {
207
- console.log(chalk.green('编译成功!'));
208
- console.log();
209
- that.buildSucess(condition, version);
210
- }
211
- })
212
215
 
213
- }
214
216
  /**
215
217
  * 将版本信息写入文件
216
218
  * @param {版本信息} version
@@ -19,6 +19,8 @@ function change(version, type) {
19
19
  ret = split[0] + "." + (++split[1]) + "." + split[2];
20
20
  } else if (updateLast.includes(type)) {
21
21
  ret = split[0] + "." + split[1] + "." + (++split[2]);
22
+ } else {
23
+ ret = split[0] + "." + split[1] + "." + (++split[2]);
22
24
  }
23
25
  }
24
26
  return ret;