Closed gandarez closed 3 years ago
So the resulting tag is the latest non-prerelease tag, right? Or in other words the latest release tag, correct?
Actually the result depends on which tag you're looking for. For master will always return the following pattern {version_label}[0-9]*
and for develop branch will always return {version_label}[0-9]*-{pre_release_id}*
.
Using the example I gave. If the calculated semver is v2.0.0
the previous matching tag
will be v1.0.0
instead of v2.0.0-dev.1
. In the other hands if the calculated semver is v2.0.0-dev.1
the previous matching tag
will be v1.0.0-dev.1
. Does it make sense?
All in all the name "previous matching tag" confuses me a little bit. It seems to describe what you do on a technical level, rather than describe what it actually is.
Do you have a better and simple description for it? I don't :(
Do you have a better and simple description for it? I don't :(
Thanks for clarifying :+1: I thought about it and we could use preceding tag
. This would express, that we search for the previous tag in a specific line (prerelease tags or release tags).
Do you have a better and simple description for it? I don't :(
Thanks for clarifying 👍 I thought about it and we could use
preceding tag
. This would express, that we search for the previous tag in a specific line (prerelease tags or release tags).
What about ancestor tag
? The git docs refers to both matching and ancestor.
What about ancestor tag? The git docs refers to both matching and ancestor.
ancestor tag
sounds good to me :+1:
This PR prints the previous matching tag if found. It's a preparation for changelog action to correcttly print the changelog based on what's already merged to the branch.
Let's think this scenario where tags are:
Before adding this feature we only had
previous tag
returningv2.0.0-dev.1
for master branch and there wasn't no way to actually return the previous tag for master. In this proposal it will returnv1.0.0
which is useful for Changelog to correctly print all commits betweenv1.0.0
andv2.0.0
instead of only printing the commits betweenv2.0.0-dev.1
andv2.0.0
.