fix(extension): version string must be numbers and dots
(cherry picked from commit 3fd35b5d30037a6e156fdb75ca4124837b37d658)
This commit is contained in:
parent
cbed2332fb
commit
97ef3f0d7b
@ -15,9 +15,11 @@ const manifest = JSON.parse(manifestRaw)
|
|||||||
const pkgRaw = fs.readFileSync("./package.json", "utf-8")
|
const pkgRaw = fs.readFileSync("./package.json", "utf-8")
|
||||||
const pkg = JSON.parse(pkgRaw)
|
const pkg = JSON.parse(pkgRaw)
|
||||||
|
|
||||||
ver_str = pkg["version"]
|
verExt = pkg["version"]
|
||||||
if (ver_str.startsWith("v")) ver_str = ver_str.slice(1)
|
if (verExt.startsWith("v")) verExt = verExt.slice(1)
|
||||||
manifest["version"] = ver_str
|
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")
|
fs.writeFileSync("./dist/manifest.json", JSON.stringify(manifest), "utf-8")
|
||||||
console.log("Write: manifest.json")
|
console.log("Write: manifest.json")
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "unlock-music",
|
"name": "unlock-music",
|
||||||
"version": "v1.10.0-beta.1",
|
"version": "v1.10.0-beta.1",
|
||||||
|
"ext_build": 0,
|
||||||
"updateInfo": "新增写入本地文件系统; 优化.kwm解锁; 支持.acc嗅探; 使用Typescript重构",
|
"updateInfo": "新增写入本地文件系统; 优化.kwm解锁; 支持.acc嗅探; 使用Typescript重构",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "Unlock encrypted music file in browser.",
|
"description": "Unlock encrypted music file in browser.",
|
||||||
|
Loading…
Reference in New Issue
Block a user