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

Add build-version override property #565

Closed
elronalds opened this issue Jul 5, 2016 · 6 comments · May be fixed by qcif/data-curator#563
Closed

Add build-version override property #565

elronalds opened this issue Jul 5, 2016 · 6 comments · May be fixed by qcif/data-curator#563

Comments

@elronalds
Copy link

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
Copy link
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
Copy link
Author

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
Copy link
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
Copy link
Author

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
Copy link
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 as completed in 0b0ed62 Jul 6, 2016
@develar
Copy link
Member

develar commented Jul 7, 2016

@elronalds 5.11.0 is available. Please see bundleVersion .

facebook-github-bot pushed a commit to facebook/flipper that referenced this issue Apr 23, 2020
Summary:
This defaults to the `version` and is used to update the inline plists
of the Frameworks that are bundled with the MacOS app bundle. Setting
them to a fixed value means that they remain unchanged across rebuilds
(bringing them in line with Linux and Windows equivalents). This
is required to ship them as separate bundles for the launcher.

Why 50? The reason this was introduced was to allow people to override
this to values >= 50 as this is somehow a Mac App Store requirement:
electron-userland/electron-builder#565 (comment)

Reviewed By: priteshrnandgaonkar

Differential Revision: D21179072

fbshipit-source-id: a6f10b7508526b4305b229bd160d6e570ddce822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants