diff --git a/BUILD.gn b/BUILD.gn index e9ccddb69d82..1c8f6f63222e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -113,6 +113,7 @@ electron_version = exec_script("script/print-version.py", [ ".git/packed-refs", ".git/HEAD", + "script/lib/get-version.js", ]) if (is_mas_build) { diff --git a/script/lib/get-version.js b/script/lib/get-version.js index b5496ec1d5d7..45a120482b05 100644 --- a/script/lib/get-version.js +++ b/script/lib/get-version.js @@ -18,5 +18,5 @@ module.exports.getElectronVersion = () => { console.error(output.stderr); throw new Error('Failed to get current electron version'); } - return output.stdout.toString().trim(); + return output.stdout.toString().trim().replace(/^v/g, ''); };