fix(extension): version string must be numbers and dots

(cherry picked from commit 3fd35b5d30037a6e156fdb75ca4124837b37d658)
master
MengYX 10 months ago
parent cbed2332fb
commit 97ef3f0d7b
No known key found for this signature in database
GPG Key ID: E63F9C7303E8F604
  1. 8
      make-extension.js
  2. 1
      package.json

@ -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…
Cancel
Save