From 216ff4021c5f60e567f13c6dd63a38c0519e7cc1 Mon Sep 17 00:00:00 2001 From: Emmm Monster <58943012+emmmx@users.noreply.github.com> Date: Wed, 11 Aug 2021 23:04:01 +0800 Subject: [PATCH] fix(extension): compute version name --- make-extension.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/make-extension.js b/make-extension.js index 2f68dd0..47e8efd 100644 --- a/make-extension.js +++ b/make-extension.js @@ -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")