fix update check if current version type is stable#2527
Merged
sunderme merged 4 commits intotexstudio-org:masterfrom Aug 12, 2022
octaeder:updatecheck
Merged
fix update check if current version type is stable#2527sunderme merged 4 commits intotexstudio-org:masterfrom octaeder:updatecheck
sunderme merged 4 commits intotexstudio-org:masterfrom
octaeder:updatecheck
Conversation
TSXVERSION changed to 4.3.1 shortly after releasing 4.3.0, but next (dev) builds are based on 4.3.0 (shown by git 4.3.0-n-g in About dialog). So we better use 4.3.0 from git number. 4.3.1 versions (alpha, beta, rc, and stable) will show git 4.3.1..., so this should be ok.
Member
|
there is still debug code in the PR ... |
Contributor
Author
|
I thought this is ok, since it only runs if you have a debug build and run the update check. |
Member
|
I would prefer not to have debug code in it. |
Member
|
and it messes up autotest output |
Member
|
I would prefer to remove the debug code completely as it degrades code readability |
for better readable code
Member
|
thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will fix a problem with current stable version 4.3.0. When updates are checked result is:
The second 0 is the revision that is printed after the version type (which should be "stable", s. next section).
Reason: Conversion of string "4.3.0" into a version object leaves type as null string instead of assigning "stable". This was intended to remember that the string was not the equivalent one "4.3.0stable0" (which would be accepted but is never used). But printing the version always suppresses stable0, so a null string for type is obsolete.
This is fixed
and I added printing some debug information. Further I added a message for the case that the current version object isn't valid (note that type is empty in the message):This is accompanied by a new auto test for this case.
Final test running txs now shows the message expected: