Skip to content

Commit

Permalink
fix(maker-wix): handle versions with prerelease information
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Dec 4, 2019
1 parent c3e2361 commit be4b29f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/maker/wix/src/MakerWix.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import MakerBase, { MakerOptions } from '@electron-forge/maker-base';
import { ForgePlatform } from '@electron-forge/shared-types';

import colors;
import logSymbols from 'log-symbols';
import path from 'path';

import { MSICreator, MSICreatorOptions } from 'electron-wix-msi/lib/creator';
Expand Down Expand Up @@ -28,10 +30,16 @@ export default class MakerWix extends MakerBase<MakerWixConfig> {
const outPath = path.resolve(makeDir, `wix/${targetArch}`);
await this.ensureDirectory(outPath);

let version = packageJSON.version;
if (version.includes('-')) {
console.warn(logSymbols.warning, 'WARNING: WiX distributables does not handle prerelease information in the app version, removing it from the MSI'.yellow);
version = this.normalizeWindowsVersion(version);
}

const creator = new MSICreator(({
description: packageJSON.description,
name: appName,
version: packageJSON.version,
version,
manufacturer: getNameFromAuthor(packageJSON.author),
exe: `${appName}.exe`,
...this.config,
Expand Down

0 comments on commit be4b29f

Please sign in to comment.