-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Based on the documentation and naming, I would assume that semver.info.lastTag returns just the last tag name. I found this not to be the case when trying to use it. I'm expecting to get back v0.2.0 but am getting v0.2.0-4-g8a4dac9. Looking at the code, the command git describe --abbrev=7 --match="v*" is being used.
The documentation for describe says:
... it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit.
The --abbrev=<n> documentation:
An <n> of 0 will suppress long format, only showing the closest tag.
I think the current value makes sense for a variable named semver.info.describe, but I think semver.info.lastTag should be computed from git describe --abbrev=0 --match="<prefix>*". Does this make sense?