@pisell/common 3.0.1 → 3.0.2
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/CHANGELOG.md
CHANGED
|
@@ -163,7 +163,7 @@ function _init() {
|
|
|
163
163
|
console.log('使用本地/dist');
|
|
164
164
|
case 35:
|
|
165
165
|
if (!(res.env === 'prod')) {
|
|
166
|
-
_context.next =
|
|
166
|
+
_context.next = 42;
|
|
167
167
|
break;
|
|
168
168
|
}
|
|
169
169
|
_fileName = res.project.fileName;
|
|
@@ -173,32 +173,35 @@ function _init() {
|
|
|
173
173
|
if (_fileName === 'admin') {
|
|
174
174
|
_fileName = 'my_pisell_v2';
|
|
175
175
|
}
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
if (!(_fileName !== 'xzero')) {
|
|
177
|
+
_context.next = 42;
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
_context.next = 42;
|
|
178
181
|
return uploadStaticToOSS(_fileName);
|
|
179
|
-
case
|
|
182
|
+
case 42:
|
|
180
183
|
console.log('开始压缩');
|
|
181
|
-
_context.next =
|
|
184
|
+
_context.next = 45;
|
|
182
185
|
return uploadCode.compress();
|
|
183
|
-
case
|
|
186
|
+
case 45:
|
|
184
187
|
console.log('✅ 压缩完成');
|
|
185
188
|
console.log('开始连接服务器');
|
|
186
|
-
_context.next =
|
|
189
|
+
_context.next = 49;
|
|
187
190
|
return uploadCode.connectServer();
|
|
188
|
-
case
|
|
191
|
+
case 49:
|
|
189
192
|
conn = _context.sent;
|
|
190
193
|
console.log('✅ 连接服务器完成');
|
|
191
194
|
console.log('开始上传');
|
|
192
|
-
_context.next =
|
|
195
|
+
_context.next = 54;
|
|
193
196
|
return uploadCode.serverUpload();
|
|
194
|
-
case
|
|
197
|
+
case 54:
|
|
195
198
|
console.log('✅ 上传完成');
|
|
196
199
|
console.log('开始解压');
|
|
197
|
-
_context.next =
|
|
200
|
+
_context.next = 58;
|
|
198
201
|
return uploadCode.serverUnpack();
|
|
199
|
-
case
|
|
202
|
+
case 58:
|
|
200
203
|
if (!res.is_release) {
|
|
201
|
-
_context.next =
|
|
204
|
+
_context.next = 63;
|
|
202
205
|
break;
|
|
203
206
|
}
|
|
204
207
|
releaseInstance = new Release({
|
|
@@ -208,32 +211,32 @@ function _init() {
|
|
|
208
211
|
conn: conn
|
|
209
212
|
});
|
|
210
213
|
console.log('开始发布');
|
|
211
|
-
_context.next =
|
|
214
|
+
_context.next = 63;
|
|
212
215
|
return releaseInstance.release();
|
|
213
|
-
case
|
|
214
|
-
_context.next =
|
|
216
|
+
case 63:
|
|
217
|
+
_context.next = 65;
|
|
215
218
|
return uploadCode.disconnectServer();
|
|
216
|
-
case
|
|
217
|
-
_context.next =
|
|
219
|
+
case 65:
|
|
220
|
+
_context.next = 67;
|
|
218
221
|
return $(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["git pull --no-edit"])));
|
|
219
|
-
case
|
|
220
|
-
_context.next =
|
|
222
|
+
case 67:
|
|
223
|
+
_context.next = 69;
|
|
221
224
|
return $(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["git push --follow-tags"])));
|
|
222
|
-
case
|
|
225
|
+
case 69:
|
|
223
226
|
console.log('✅ 成功后推送到git');
|
|
224
|
-
_context.next =
|
|
227
|
+
_context.next = 81;
|
|
225
228
|
break;
|
|
226
|
-
case
|
|
227
|
-
_context.prev =
|
|
229
|
+
case 72:
|
|
230
|
+
_context.prev = 72;
|
|
228
231
|
_context.t0 = _context["catch"](26);
|
|
229
232
|
console.log(_context.t0, '执行出错 请排查重试');
|
|
230
|
-
_context.next =
|
|
233
|
+
_context.next = 77;
|
|
231
234
|
return $(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["git reset HEAD~1"])));
|
|
232
|
-
case
|
|
233
|
-
_context.next =
|
|
235
|
+
case 77:
|
|
236
|
+
_context.next = 79;
|
|
234
237
|
return $(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["git tag -d v", ""])), uploadCode.currentVersion);
|
|
235
|
-
case
|
|
236
|
-
_context.next =
|
|
238
|
+
case 79:
|
|
239
|
+
_context.next = 81;
|
|
237
240
|
return sendWebhook({
|
|
238
241
|
title: "".concat(res.project.fileName, " ").concat(res.env, "\u73AF\u5883").concat(res.is_release ? '上传并发布' : '上传', "\u5931\u8D25"),
|
|
239
242
|
content: [{
|
|
@@ -247,8 +250,8 @@ function _init() {
|
|
|
247
250
|
value: version || ''
|
|
248
251
|
}]
|
|
249
252
|
});
|
|
250
|
-
case
|
|
251
|
-
_context.next =
|
|
253
|
+
case 81:
|
|
254
|
+
_context.next = 83;
|
|
252
255
|
return sendWebhook({
|
|
253
256
|
title: "".concat(res.project.fileName, " ").concat(res.env, "\u73AF\u5883").concat(res.is_release ? '上传并发布' : '上传', "\u6210\u529F"),
|
|
254
257
|
content: [{
|
|
@@ -262,13 +265,13 @@ function _init() {
|
|
|
262
265
|
value: version || ''
|
|
263
266
|
}]
|
|
264
267
|
});
|
|
265
|
-
case 82:
|
|
266
|
-
uploadCode.deleteLocalZip();
|
|
267
268
|
case 83:
|
|
269
|
+
uploadCode.deleteLocalZip();
|
|
270
|
+
case 84:
|
|
268
271
|
case "end":
|
|
269
272
|
return _context.stop();
|
|
270
273
|
}
|
|
271
|
-
}, _callee, null, [[26,
|
|
274
|
+
}, _callee, null, [[26, 72]]);
|
|
272
275
|
}));
|
|
273
276
|
return _init.apply(this, arguments);
|
|
274
277
|
}
|
|
@@ -153,7 +153,9 @@ async function init() {
|
|
|
153
153
|
if (_fileName === "admin") {
|
|
154
154
|
_fileName = "my_pisell_v2";
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
if (_fileName !== "xzero") {
|
|
157
|
+
await (0, import_aws.uploadStaticToOSS)(_fileName);
|
|
158
|
+
}
|
|
157
159
|
}
|
|
158
160
|
console.log("开始压缩");
|
|
159
161
|
await uploadCode.compress();
|
package/package.json
CHANGED
|
@@ -146,8 +146,10 @@ async function init() {
|
|
|
146
146
|
if (_fileName === 'admin') {
|
|
147
147
|
_fileName = 'my_pisell_v2'
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
if (_fileName !== 'xzero') {
|
|
150
|
+
// 上传oss
|
|
151
|
+
await uploadStaticToOSS(_fileName);
|
|
152
|
+
}
|
|
151
153
|
}
|
|
152
154
|
|
|
153
155
|
console.log('开始压缩');
|