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.
Motivation
Prior to this PR,
krr version
returned an incorrect hardcoded version number (1.8.2-dev) when run from source.Background
At present, when
krr version
is run from a proper release (e.g. installed with brew or downloaded from github) then it returns a correct version number that was patched by the github action for releases. When run from source, krr returns an incorrect number.We have a GitHub action which is supposed to patch the version upon release in the source code, but it doesn't work and hasn't for some time if ever. (E.g. see a recent failure here.) I don't think that fixing that GitHub action is the correct approach either because it means we will have commits on main that never went through a PR. (E.g. commit generated by the auto-version-bump.)
Therefore I've removed that GitHub action and implemented a proper version command that takes dev releases into account. The implementation is based on similar code I wrote for HolmesGPT.
Testing
I tested the version command on a dev build and verified that it returns correct output.