Browse Source
fix(extension): version string must be numbers and dots
(cherry picked from commit 3fd35b5d30037a6e156fdb75ca4124837b37d658)
20230320
MengYX
3 years ago
No known key found for this signature in database
GPG Key ID: E63F9C7303E8F604
2 changed files with
6 additions and
3 deletions
-
make-extension.js
-
package.json
|
@ -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.", |
|
|