cli: fix version constraint for update check (close #3719) #3730
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.
Description
f6a43fe changed the semver check constraint that compares latest and current cli versions for update checks. If current version is
v1.0.0
and latest version is alsov1.0.0
, cli updates itself even though the versions are the same. This is because the constraint adds a-0
and effectively1.0.0-0
is behind1.0.0
.Affected components
Related Issues
close #3719
Solution and Design
The constraint is changed back to how it was. Since we don't publish pre-release versions via the API this won't cause any issues with update checks.
Steps to test and verify
Build CLI with
v1.0.0
and executehasura update-cli
, earlier cli updates itself to v1.0.0 but now it says already at updated version.