修复版本号匹配

This commit is contained in:
hanhh
2021-10-13 22:45:24 +08:00
parent cb86fda169
commit 7acda0c039
2 changed files with 5 additions and 6 deletions
+2 -3
View File
@@ -380,9 +380,8 @@ export default class UserService {
public async checkUpdate() {
try {
const versionRegx = /.*export const version = (.*)\n/;
const logRegx = /.*export const changeLog = (.*)\n/;
const linkRegx = /.*export const changeLogLink = (.*)\n/;
const versionRegx = /.*export const version = \'(.*)\'\n/;
const logRegx = /.*export const changeLog = \`(.*)\`/;
const currentVersionFile = fs.readFileSync(config.versionFile, 'utf8');
const currentVersion = currentVersionFile.match(versionRegx)![1];