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

Add build-version override property #565

Closed
elronalds opened this Issue Jul 5, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@elronalds

elronalds commented Jul 5, 2016

  • Version: 5.6.1
  • Target: mac (zip and mas)

I'd have an existing app in the app store with an app-version like 1.0.50 and the build-version is set to just 50. It doesn't seem like I can override the build-version that is passed into electron-packager.

The Mac app store will decline my app if I try to submit it as 1.0.50 as that isn't higher than the build version 50. I don't really want to change the app version from 1.0.50 to 51.0.51 either.

Any chance we could have a property added to do this that completely overrides the build version in the Mac app plist file?

If I add the "build-version" property to the "build" section it seems to append that to the end of my version string. Should it be doing that or is there a way to override that?

@develar

This comment has been minimized.

Member

develar commented Jul 5, 2016

If version in the package.json is 1.0.50, then

CFBundleShortVersionString is set to 1.0.50

CFBundleVersion is set to 1.0.50 + https://github.com/electron-userland/electron-builder/wiki/Options#build-version-management

So, I don't understand "with an app-version like 1.0.50 and the build-version is set to just 50" Do you mean build number?

Any chance we could have a property added to do this that completely overrides the build version in the Mac app plist file?

What it is the version in your package.json? 1.0.50? Please attach here you resulting Info.plist (CFBundleShortVersionString/CFBundleVersion)

@elronalds

This comment has been minimized.

elronalds commented Jul 6, 2016

Basically, I want to be able to set the app-version and build-version to different strings. At the moment it just sets them both to the same version in the package.json.

I want CFBundleShortVersionString to be 1.0.50 and CFBundleVersion should be 50

Within electron-packager I can set these versions independently, but within electron-builder I can not do that. It would be nice to have these same options within electron-builder

Edit: I realise that the version should probably have just been left so both CFBundleShortVersionString and CFBundleVersion are set to 1.0.50 however the Mac app store forces you to increment the CFBundleVersion and this was already set to an integer that was higher than our public release versions.

@develar

This comment has been minimized.

Member

develar commented Jul 6, 2016

If I add the "build-version" property to the "build" section it seems to append that to the end of my version string. Should it be doing that or is there a way to override that?

It is valid and recommended way to set.

CFBundleVersion (String - iOS, OS X) specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle. The build version number should be a string comprised of three non-negative, period-separated integers with the first integer being greater than zero. The string should only contain numeric (0-9) and period (.) characters. Leading zeros are truncated from each integer and will be ignored (that is, 1.02.3 is equivalent to 1.2.3). This key is not localisable.

So, if you set build-version to 52, you will get CFBundleVersion as 1.5.0. 52

Or do you use 50 as a CFBundleVersion previously and now, after migrating to electron-builder, you need to to use on 50+ CFBundleVersion, right?

@elronalds

This comment has been minimized.

elronalds commented Jul 6, 2016

Yes, I need to use a 50+ CFBundleVersion as the build needs to be higher for the Mac app store. There doesn't seem to be any way to stop the build-version being appended.

Any ideas how this could be fixed for a future update?

@develar

This comment has been minimized.

Member

develar commented Jul 6, 2016

Any ideas how this could be fixed for a future update?

bundleVersion is added to build.mac. Release will be soon.

develar added a commit to develar/electron-builder that referenced this issue Jul 6, 2016

@develar develar closed this in 0b0ed62 Jul 6, 2016

@develar

This comment has been minimized.

Member

develar commented Jul 7, 2016

@elronalds 5.11.0 is available. Please see bundleVersion .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment