From b664380dfd6d22dabbeb451749abb84c9fb4fc2f Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Tue, 20 Jan 2026 01:40:59 +0530 Subject: [PATCH] fix electron build package.json --- apps/x/apps/main/forge.config.cjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/x/apps/main/forge.config.cjs b/apps/x/apps/main/forge.config.cjs index 595b6ec9..49ddfbe2 100644 --- a/apps/x/apps/main/forge.config.cjs +++ b/apps/x/apps/main/forge.config.cjs @@ -153,9 +153,11 @@ module.exports = { // This tells Electron where to find the entry point // Note: No "type": "module" since we bundle as CommonJS for compatibility // with dependencies that use dynamic require() + // Read version from source package.json (updated by CI from git tag) + const sourcePackageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8')); const packageJson = { name: '@x/main', - version: '0.1.0', + version: sourcePackageJson.version, main: 'dist-bundle/main.js', }; fs.writeFileSync( @@ -220,9 +222,11 @@ module.exports = { const packageJsonPath = path.join(appResourcesPath, 'package.json'); if (fs.existsSync(packageJsonPath)) { console.log('Updating package.json...'); + // Read version from source package.json (updated by CI from git tag) + const sourcePackageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8')); const packageJson = { name: '@x/main', - version: '0.1.0', + version: sourcePackageJson.version, main: 'dist-bundle/main.js', // Note: No "type": "module" since we bundle as CommonJS // No dependencies/devDependencies since everything is bundled