mirror of
https://git.unlock-music.dev/um/web.git
synced 2024-12-29 06:55:02 +08:00
fix(extension): version string must be numbers and dots
(cherry picked from commit 3fd35b5d30037a6e156fdb75ca4124837b37d658)
This commit is contained in:
parent
5d8a726746
commit
9c3e39502a
@ -15,9 +15,11 @@ const manifest = JSON.parse(manifestRaw)
|
||||
const pkgRaw = fs.readFileSync("./package.json", "utf-8")
|
||||
const pkg = JSON.parse(pkgRaw)
|
||||
|
||||
ver_str = pkg["version"]
|
||||
if (ver_str.startsWith("v")) ver_str = ver_str.slice(1)
|
||||
manifest["version"] = ver_str
|
||||
verExt = pkg["version"]
|
||||
if (verExt.startsWith("v")) verExt = verExt.slice(1)
|
||||
if (verExt.includes("-")) verExt = verExt.split("-")[0]
|
||||
manifest["version"] = `${verExt}.${pkg["ext_build"]}`
|
||||
manifest["version_name"] = pkg["version"]
|
||||
|
||||
fs.writeFileSync("./dist/manifest.json", JSON.stringify(manifest), "utf-8")
|
||||
console.log("Write: manifest.json")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "unlock-music",
|
||||
"version": "v1.10.0-beta.1",
|
||||
"ext_build": 0,
|
||||
"updateInfo": "新增写入本地文件系统; 优化.kwm解锁; 支持.acc嗅探; 使用Typescript重构",
|
||||
"license": "MIT",
|
||||
"description": "Unlock encrypted music file in browser.",
|
||||
|
Loading…
Reference in New Issue
Block a user