build: strip v in the getElectronVersion helper

This commit is contained in:
Samuel Attard 2022-10-26 17:56:02 -07:00
parent 625b4619d6
commit 99a34d5209
No known key found for this signature in database
GPG key ID: 7296A7AB7521D713
2 changed files with 2 additions and 1 deletions

View file

@ -113,6 +113,7 @@ electron_version = exec_script("script/print-version.py",
[ [
".git/packed-refs", ".git/packed-refs",
".git/HEAD", ".git/HEAD",
"script/lib/get-version.js",
]) ])
if (is_mas_build) { if (is_mas_build) {

View file

@ -18,5 +18,5 @@ module.exports.getElectronVersion = () => {
console.error(output.stderr); console.error(output.stderr);
throw new Error('Failed to get current electron version'); throw new Error('Failed to get current electron version');
} }
return output.stdout.toString().trim(); return output.stdout.toString().trim().replace(/^v/g, '');
}; };