Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade electron-forge to 7.5.0 #2526

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions ui/desktop/electron-app/config/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ const fs = require('fs');
const path = require('path');
const { isLinux } = require('../src/helpers/platform.js');

/** Always returns a valid semVer. Composed of Major.Minor.Path and all valid integers
* Otherwise we run into this issue: https://github.com/electron/packager/issues/1714#issuecomment-2091266284
*/
const returnSemVerFromReleaseVersion = (releaseVersion) => {
let [major, minor, patch] = releaseVersion.split('.').slice(0, 3);

// Delete, if present, v from Major
if (!parseInt(major)) {
major = major.replace('v', '');
}
// parseInt the patch to eliminate any text after the version integer.
return `${major}.${minor}.${parseInt(patch)}`;
};

// Create config
const createConfig = () => {
const config = {
Expand All @@ -13,9 +27,16 @@ const createConfig = () => {
executableName: 'Boundary',
};

if (isLinux()) config.executableName = 'boundary-desktop';
// Take a valid release version in semVer format.
if (!config.releaseVersion) {
config.releaseVersion = '0.0.0';
} else {
config.releaseVersion = returnSemVerFromReleaseVersion(
config.releaseVersion,
);
}

if (!config.releaseVersion) config.releaseVersion = '0.0.0';
if (isLinux()) config.executableName = 'boundary-desktop';
return config;
};

Expand Down
17 changes: 7 additions & 10 deletions ui/desktop/electron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"premake": "yarn build:cli && yarn build:config",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\"",
"postinstall": "patch-package"
"lint": "echo \"No linting configured\""
},
"keywords": [],
"config": {
Expand All @@ -37,15 +36,13 @@
"which": "^4.0.0"
},
"devDependencies": {
"@electron-forge/cli": "^7.2.0",
"@electron-forge/maker-deb": "^7.2.0",
"@electron-forge/maker-dmg": "^7.2.0",
"@electron-forge/maker-squirrel": "^7.2.0",
"@electron-forge/maker-zip": "^7.2.0",
"@electron-forge/cli": "^7.5.0",
"@electron-forge/maker-deb": "^7.5.0",
"@electron-forge/maker-dmg": "^7.5.0",
"@electron-forge/maker-squirrel": "^7.5.0",
"@electron-forge/maker-zip": "^7.5.0",
"electron": "31.0.1",
"unzipper": "^0.11.5",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0"
"unzipper": "^0.11.5"
},
"resolutions": {
"highlight.js": "^10.4.1"
Expand Down
45 changes: 0 additions & 45 deletions ui/desktop/electron-app/patches/lodash.template+4.5.0.patch

This file was deleted.

Loading