版本文件改为七牛云存储

This commit is contained in:
whyour
2022-02-19 22:48:06 +08:00
parent 7d6e1d3e3d
commit f71b3d0378
9 changed files with 496 additions and 145 deletions
+4 -7
View File
@@ -87,13 +87,10 @@ export default class SystemService {
let lastVersion = '';
let lastLog = '';
try {
const result = await Promise.race([
got.get(config.lastVersionFile, { timeout: 6000, retry: 0 }),
got.get(`https://ghproxy.com/${config.lastVersionFile}`, {
timeout: 6000,
retry: 0,
}),
]);
const result = await got.get(config.lastVersionFile, {
timeout: 6000,
retry: 0,
});
const lastVersionFileContent = result.body;
lastVersion = lastVersionFileContent.match(versionRegx)![1];
lastLog = lastVersionFileContent.match(logRegx)