Skip to content

Commit 918ea14

Browse files
vveerrggclaude
andcommitted
fix: auto-zip Chrome build and bump chrome-manifest to 1.5.5
build.js now creates distros/nostrkey-chrome-v{version}.zip automatically after the Chrome build, preventing stale zips from causing CWS upload failures. Also bumps chrome-manifest.json version that was missed in the 1.5.5 release. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8553fa6 commit 918ea14

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

build.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const esbuild = require('esbuild');
44
const fs = require('fs');
55
const path = require('path');
6+
const { execSync } = require('child_process');
67

78
const mode = process.argv[2] || 'dev';
89
const target = process.argv[3] || 'safari'; // safari | chrome | all
@@ -166,7 +167,15 @@ async function buildChrome(opts = {}) {
166167
// Chrome-specific manifest
167168
fs.copyFileSync(path.join(SRC, 'chrome-manifest.json'), path.join(CHROME_DIST, 'manifest.json'));
168169

170+
// Zip for Chrome Web Store upload
171+
const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
172+
const zipName = `nostrkey-chrome-v${pkg.version}.zip`;
173+
const zipPath = path.join('./distros', zipName);
174+
if (fs.existsSync(zipPath)) fs.unlinkSync(zipPath);
175+
execSync(`cd ${CHROME_DIST} && zip -r ../${zipName} . -x '.*'`);
176+
169177
console.log(`Chrome build complete → ${CHROME_DIST}/`);
178+
console.log(`Chrome zip → ./distros/${zipName}`);
170179
}
171180

172181
// ---------------------------------------------------------------------------

src/chrome-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"default_locale": "en",
44
"name": "__MSG_extension_name__",
55
"description": "__MSG_extension_description__",
6-
"version": "1.5.4",
6+
"version": "1.5.5",
77
"short_name": "NostrKey",
88
"author": "Humanjava Enterprises Inc",
99
"homepage_url": "https://nostrkey.com",

0 commit comments

Comments
 (0)