Open mchernicoff opened 3 months ago
Probably try some common patterns for matching tags, and otherwise error out and tell the user to use the --ref
flag.
To match version X.Y.Z
we should check:
vX.Y.Z
packagename-X.Y.Z
packagename-vX.Y.Z
packagename_X.Y.Z
packagename_vX.Y.Z
When Hipcheck is given an NPM or PyPI package to check with a version, it uses that version number as a tag refspec for the corresponding Git repository. If that repository does not have a tag corresponding to that version (e.g. the tag for an older release has been deleted) or the tag is not formatted exactly as a plain semver string (e.g.
v.1.2.3
instead of1.2.3
), Hipcheck will quit with the following error message:As a short term fix, we should change the error message to explain what has happened and suggest corrective action for the user (e.g. try again with no version number and an optional
--ref
flag that matches an existing tag). Longer term, we may wish to handle a missing version tag more gracefully.