Open cueedee opened 8 years ago
On closer inspection, v1.0.1
and the current master
do not exhibit identical behaviour:
When the repository does contain semver tags, but not in the current branch, then the current master
will not find it, but v1.0.1
(given a recent git
) will.
o---o---o tag:v1.0.0, master
\
o---o---o HEAD, develop
This is because git-semver-tags (as used in the current master
) walks only the current branch, whereas v1.0.1 includes all tags.
@cueedee have you been checking this issue more recently? Is is still the case that the tags from other branches are being grabbed?
@kachkaev; I hadn't looked into this since reporting the issue, but I have now.
I find that the currrent git-latest-semver-tag(@v1.0.2
) will not find the v1.0.0
tag in the above example.
The previous git-latest-semver-tag(@v1.0.1
) otoh, does (or did) find it.
Note that this isn't the issue originally reported, but it would seem this is definitely a problem too if git-latest-semver-tag really is expected to find the latest semver-tag regardless of the currently checked out commit.
Specifically, using git version
1.7.12.4 (Apple Git-37)
, the output of:Doesn't include the
tag:
prefix for tagged commits. That is, for example it produces this:... instead of this:
And that causes your
regex
to not match.It looks like the next, as of yet unreleased version of index.js in
master
will already fix this. Is it going to be released anytime soon?Alternatively you might consider changing index.js @
v1.0.1
from this:... into this:
... because that output does match.