diff --git a/packages/electron-builder/src/targets/WebInstaller.ts b/packages/electron-builder/src/targets/WebInstaller.ts index 7d7a296758d..a8ffaf62347 100644 --- a/packages/electron-builder/src/targets/WebInstaller.ts +++ b/packages/electron-builder/src/targets/WebInstaller.ts @@ -39,6 +39,8 @@ export default class WebInstallerTarget extends NsisTarget { } protected generateGitHubInstallerName(): string { - return `${this.packager.appInfo.name}-WebSetup-${this.packager.appInfo.version}.exe` + const appInfo = this.packager.appInfo + const classifier = appInfo.name.toLowerCase() === appInfo.name ? "web-setup" : "WebSetup" + return `${appInfo.name}-${classifier}-${appInfo.version}.exe` } } \ No newline at end of file diff --git a/packages/electron-builder/src/targets/nsis.ts b/packages/electron-builder/src/targets/nsis.ts index f31d8040779..a37fb1b2832 100644 --- a/packages/electron-builder/src/targets/nsis.ts +++ b/packages/electron-builder/src/targets/nsis.ts @@ -180,7 +180,9 @@ export default class NsisTarget extends Target { } protected generateGitHubInstallerName() { - return `${this.packager.appInfo.name}-${this.isPortable ? "" : "Setup-"}${this.packager.appInfo.version}.exe` + const appInfo = this.packager.appInfo + const classifier = appInfo.name.toLowerCase() === appInfo.name ? "setup-" : "Setup-" + return `${appInfo.name}-${this.isPortable ? "" : classifier}${appInfo.version}.exe` } private get isUnicodeEnabled() { diff --git a/test/out/windows/__snapshots__/installerTest.js.snap b/test/out/windows/__snapshots__/installerTest.js.snap index 60907a20c52..321085d4e6f 100644 --- a/test/out/windows/__snapshots__/installerTest.js.snap +++ b/test/out/windows/__snapshots__/installerTest.js.snap @@ -5,7 +5,7 @@ Object { "win": Array [ Object { "file": "Test Custom Installation Dir Setup 1.1.0.exe", - "safeArtifactName": "test-custom-inst-dir-Setup-1.1.0.exe", + "safeArtifactName": "test-custom-inst-dir-setup-1.1.0.exe", }, ], } @@ -21,7 +21,7 @@ Object { exports[`allowToChangeInstallationDirectory 3`] = ` Object { - "githubArtifactName": "test-custom-inst-dir-Setup-1.1.0.exe", + "githubArtifactName": "test-custom-inst-dir-setup-1.1.0.exe", "path": "Test Custom Installation Dir Setup 1.1.0.exe", "version": "1.1.0", } diff --git a/test/out/windows/__snapshots__/oneClickInstallerTest.js.snap b/test/out/windows/__snapshots__/oneClickInstallerTest.js.snap index 67926cc3859..d1729e84f80 100644 --- a/test/out/windows/__snapshots__/oneClickInstallerTest.js.snap +++ b/test/out/windows/__snapshots__/oneClickInstallerTest.js.snap @@ -29,7 +29,7 @@ Object { "win": Array [ Object { "file": "Test Menu Category CustomName 1.1.0.exe", - "safeArtifactName": "test-menu-category-Setup-1.1.0.exe", + "safeArtifactName": "test-menu-category-setup-1.1.0.exe", }, ], }