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

Internal version numbers for pre-releases #332

Open
magol opened this Issue Sep 21, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@magol

magol commented Sep 21, 2016

When you install a application in Windows, the application must have a version in the form major.minor.patch, and that match semver. But what do I do with eg. version 1.1.3-rc1

We must have some way of have numerical version numbers for pre-releases.

One (bad) option is not to allow any pre-release for patches and increase the patch version for each pre-release.

semver internal version
1.8.0-rc1 1.8.0
1.8.0-rc2 1.8.1
1.8.0-rc3 1.8.2
1.8.3 1.8.3

I don't like it, it is strange. But how should I do?

@FichteFoll

This comment has been minimized.

FichteFoll commented Sep 21, 2016

Can't you just use 1.8.0 for all of them? I mean, the main version part is still 1.8.0 and only the pre-release identifier, which Windows doesn't support, changes. Or do these versions have to increment?

@magol

This comment has been minimized.

magol commented Sep 22, 2016

But, if I install 1.8.0-rc2 with version number 1.8.0 and then install 1.8.0-rc3 also with version number 1.8.0, do Windows see any difference between the versions?

Unless I misunderstood something, MSI will see it as I'm trying to install the same version that I already have with strange results as a consequence. We have in any case not got it to work when we tested.

@lvv83

This comment has been minimized.

lvv83 commented Mar 2, 2017

What about fourth (build) number for internal version? Something like this

semver internal version
1.8.0-rc1 1.8.0.1
1.8.0-rc2 1.8.0.2
1.8.0-rc3 1.8.0.3
1.8.0 1.8.0.4
@magol

This comment has been minimized.

magol commented Mar 2, 2017

@lvv83 Great suggestion, but I do think that MSI only care about three numbers :-(

@lvv83

This comment has been minimized.

lvv83 commented Mar 2, 2017

Well, MSI ProductVersion is incompatible with semver cause it use major.minor.build format (no prereleases). Also it has constraints like maximum value of 255 for major and minor, 65535 for build.

So, we need for some new rule, which translates semver to MSI ProductVersion and vice versa.
We can combine patch and prerelease numbers from semver to the MSI build number. But first we need to replace semver with appropriate internal version.

semver internal version msi version
1.8.0-rc1 1.8.0.1 1.8.1
1.8.0-rc2 1.8.0.2 1.8.2
1.8.0-rc3 1.8.0.3 1.8.3
1.8.0 1.8.0.4 1.8.4
1.8.1-rc1 1.8.1.1 1.8.1001
1.8.1-rc2 1.8.1.2 1.8.1002
internal format is "X.Y.Z.N";
msi_build = Z * 1000 + N 
@magol

This comment has been minimized.

magol commented Mar 2, 2017

I like this solution. But it is strange that the numbers go from 4 to 1001.

@lvv83

This comment has been minimized.

lvv83 commented Mar 2, 2017

You can use any rule for msi build number. Yet one without strange gaps.

Z >= 0 && Z < 100;
N >= 0 && N < 100;

msi_build = 10000 + Z * 100 + N;
semver internal version msi version
1.8.0-rc1 1.8.0.1 1.8.10001
1.8.0-rc2 1.8.0.2 1.8.10002
1.8.0-rc3 1.8.0.3 1.8.10003
1.8.0 1.8.0.4 1.8.10004
1.8.1-rc1 1.8.1.1 1.8.10101
1.8.1-rc2 1.8.1.2 1.8.10102
@711216

This comment has been minimized.

711216 commented Nov 29, 2018

Cuando instala una aplicación en Windows, la aplicación debe tener una versión con el formato major.minor.patch y que coincida con semver. Pero, ¿qué hago con eg. versión 1.1.3-rc1

Debemos tener alguna forma de tener números de versión numéricos para las versiones preliminares.

Una (mala) opción es no permitir ningún prelanzamiento para parches y aumentar la versión del parche para cada prelanzamiento.

semver versión interna
1.8.0-rc1 1.8.0
1.8.0-rc2 1.8.1
1.8.0-rc3 1.8.2
1.8.3 1.8.3
No me gusta, es extraño. Pero, ¿cómo debo hacer?

Buscar archivos de mi nube

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