New version logic ready to merge

@bar
all of these are tested.

Currently version numbers are set multiple places in the UI and firmware, so what version gets reported depends on where you look/how you ask.

These PRs make it so that the same version is reported everywhere.
To use this, before you compile a release, do git tag v1.13 to tag the version you intend to release (in both repos) and once this is done, then when you startup, the UI should warn you if they are different.

In addition, it makes the version more useful when compiling versions
between releases. Instead of everything between 1.12 and 1.13 reporting the version 1.12, they will instead report v1.12-#-hash where # is the number of commits since 1.12 and hash is the first digits of the commit has that was used to compile this code. People using this will get the UI warning, but they know they are running testing code so it should not be an issue, but when people are testing, it will provide a way of confirming what was being tested and make sure people didn’t accidentally load a different version than they expected.

set version of UI via git tag

set version of firmware via git tag

compare UI and firmware versions at startup

1 Like

Should I merge one of them or all of them?

Bar wrote:

Should I merge one of them or all of them?

all of them.

one is to set the version from git tags for the UI
one is to set the version from git tags for the firmware
the third is to do a comparison between them

if you want to play it safe, merge the first two (worst that happens is invalid
version numbers) and then test the third separately until you are comfortable.

David Lang

just after you merge these, without tagging anything, the version numbers will get ‘interesting’

in the firmware, they will be v1.12-#-hash
in the UI they will be 2.1-###-hash (the firmware has not been tagged since it forked from the upstream v2.1)

you can use git tag to tag an older commit with a command like git tag v1.12 hash-of-v1.12

I merged the first one, but the second link doesn’t point to a pull request, it’s the issue for the first pull request

try this

the 2nd link was into the fluidnc repo to the issue for this PR, sorry

1 Like

That one is closed because you wanted to clean it up a bit in #347