mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2026-04-06 08:06:53 +00:00
Fix to provide correct previous version when the current commit is tagged.
This commit is contained in:
parent
92bc0a8ba4
commit
ba6e71e658
5 changed files with 32 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ class DefaultLastReleaseResolver {
|
|||
// so that we will have an accurate increment (assuming the new tag is the expected one)
|
||||
const command = `git for-each-ref --count=2 --sort=-v:*refname --format=%(refname:short) --merged=${current} ${refPrefixPattern}${releasePattern}`;
|
||||
tag = yield (0, CommandRunner_1.cmd)(command);
|
||||
tag = tag.split('\n').at(-1) || '';
|
||||
tag = tag.split('\n').reverse().find(t => t !== '' && t !== currentTag) || '';
|
||||
}
|
||||
else {
|
||||
const command = `git for-each-ref --count=1 --sort=-v:*refname --format=%(refname:short) --merged=${current} ${refPrefixPattern}${releasePattern}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue