fix(extension): compute version name

This commit is contained in:
Emmm Monster 2021-08-11 23:04:01 +08:00
parent d3898161b9
commit 216ff4021c
No known key found for this signature in database
GPG Key ID: C98279C83FB50DB9
1 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,9 @@ const manifest = JSON.parse(manifestRaw)
const pkgRaw = fs.readFileSync("./package.json", "utf-8")
const pkg = JSON.parse(pkgRaw)
manifest["version"] = pkg["version"]
ver_str = pkg["version"]
if (ver_str.startsWith("v")) ver_str = ver_str.slice(1)
manifest["version"] = ver_str
fs.writeFileSync("./dist/manifest.json", JSON.stringify(manifest), "utf-8")
console.log("Write: manifest.json")