-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Invalid product versions for NSIS when packaging in CI #2635
Invalid product versions for NSIS when packaging in CI #2635
Comments
I can acknowledge, I had a very obscure error:
My workaround was to use Example (in scripts in
|
There might have been spaces in your build string format, causing makensis.exe to see multiple arguments? I use the same workaround by the way, but I forgot documenting it. I hope it gets resolved so I can remove the workaround. |
https://stackoverflow.com/a/37070889 Fixed, thanks for clear issue report. |
We have a legitimate need for the build number to be appended to version for appx releases. See #3875 for details. |
The product version (X.X.X.X) is given to NSIS as a command line variable called VIProductVersion. This build number is generated by the function
versionInWeirdWindowsForm()
(which can be found inpackages/electron-builder-lib/src/appInfo.ts
). To fill in the last digit, which is not present in Node, it uses the build number environment variable or 0 if this is not present. It is set as follows, in the same file:this.buildNumber = process.env.BUILD_NUMBER || process.env.TRAVIS_BUILD_NUMBER || process.env.APPVEYOR_BUILD_NUMBER || process.env.CIRCLE_BUILD_NUM || process.env.BUILD_BUILDNUMBER
However, it is not checked whether this environment variable is actually numeric. In case of Visual Studio Team Services (and probably other CI providers as well), this variable is alphanumeric (resulting in
1.2.3.Build123
for example). When NSIS is started to create the installer package, an invalid build number is passed making it throw an error and stop packaging.This problem should be handled by Electron Builder. I suggest detecting an alphanumeric value and setting the build number to 0 if this is the case, preventing errors.
The text was updated successfully, but these errors were encountered: