BundleVersion and BundleShortVersion often not used
I needed to set a different bundleVersion and bundleShortVersion for a mas target. According to the config documentation you can set these properties for this target. However looking in the code for AppInfo these are never passed in. platformSpecificOptions comes from the mac target. Nothing is passed in from the mas target. However even bundleShortVersion isn't even used if set in the mac target.
These should be removed from the documentation if they aren't going to be used.
Hmmm they should be getting used correctly per the docs. I'll add this to my todo list to investigate
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Bump please.
I encountered this myself when trying to submit multiple builds to Mac App Store with different bundleVersion but the same bundleShortVersion.
I use electron-builder v26.0.1.
In macPackager.ts I see:
// eslint-disable-next-line @typescript-eslint/no-unused-vars
protected prepareAppInfo(appInfo: AppInfo): AppInfo {
// codesign requires the filename to be normalized to the NFD form
return new AppInfo(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions, true)
}
Unfortunately, it ignores this.config.masVersion.bundleVersion.
I can hack it to try buildVersion from mas configuration first:
protected prepareAppInfo(appInfo: AppInfo): AppInfo {
// codesign requires the filename to be normalized to the NFD form
return new AppInfo(this.info, this.config.mas?.bundleVersion || this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions, true)
}
but in that case it will use mas build version for regular mac package. I don't have much knowledge of electron-builder source code, so, any suggestion from maintainers would be appreciated :)